Tracking Ecommerce on an External Website


#1

I’m attempting to track ecommerce conversions on an external website. I’d like to only track conversions that came from my Piwik-enabled domain. For example:

www.my-domain.com -> www.acme-products.com = tracked conversion
www.google.com -> www.acme-products.com = not tracked

Is this possible with the current goals/ecommerce setup or with the tracking API?

One thought that I’ve been toying with is creating a custom tracking “pixel” for the external website. This “pixel” would be a PHP page that would try and detect if the user has been to my Piwik-enabled site. If so, it would manually track the order through the API. I’m just not sure what to look for to signify the user had been to my Piwik-enabled site.


#2

I have exactly the same question. Does anybody have a sloution for this?


(Matthieu Aubry) #3

What exactly do you mean: do you want to track what is happening on other websites that you do not control ?

You will have to convince the website owners to put the Piwik JS code on their page?


(Peterbo) #4

This is not too easy indeed. Though it is an absolutely typical usecase for an affiliate tracking (e.g. “bridge-sites” ) . Piwik is making use of 1st party cookies, so the cookies can not be accessed from the context of the other domain.

A custom tracking pixel makes sense, but you would have to pass an identifier (e.g. visitorID) as sub-ID to recognize the user after conversion. At least if you don’t want to rely only on the user’s IP.

If, for example, no visitor ID was passed, the visitor did not visit your piwik tracked site before.


#5

The current scenario I’m working on goes like this:

  1. User clicks a custom tracking link, similar to what is used with affiliate networks - my-domain.com - This website is for sale! - my-domain Resources and Information.. The random letters and numbers at the end are an encrypted string containing the target URL and the visitor ID.
  2. The tracking link uses the PHP API to track a goal conversion within Piwik, then redirects to the actual target URL at http://www.acme-products.com
  3. If the user makes a purchase at http://www.acme-products.com, a custom pixel is displayed on their conversion page. Note: the pixel needs to be placed there by the acme-products.com development team.
  4. The tracking pixel is actually a reference to a PHP script on my-domain.com. This script again uses the PHP API to query the database to determine if this particular visitor has tracked the goal conversion in the last 30 days. If so, an ecommerce transaction is manually tracked with the API.

I wish there was a simpler way but this is the only solution I could come up with at this time.


(Matthieu Aubry) #6

OK this solution sounds good to me. How do you think it should be easier? Is it easier with google analytics for example?


#7

I’m not saying it should be easier or that some other system like Google Analytics is easier, I was just saying it would be nice if there was an easier way of doing it. It’s not a common feature so I understand why it’s not. It’s not 100% how I’d like it yet, but I’m loving the capabilities of the API and how everything is coming along.