Search code examples
google-analyticsuniversal-analytics

Analytics Callback without User


I have an affiliate website that uses a 3rd party to track user clicks and subsequent commissions. The 3rd party site send transaction notifications back to my server and I would like to feed these into Google (Universal) Analytics.

There was a script from "Affiliates2Analytics" but I cannot get this to work. It relies on the _utm.gif and a load of parameters:

http://3v4l.org/GSo6S/refs

Are there are any ways to track an eCommerce transaction at a later date, ideally to tie in with the original user information from the _ga cookie?

UPDATE: A unique ID would be set with the click reference (that gets stored with the central affiliate site). This ID gets passed back with the transaction notification POST data, allowing me to retrieve the Analytics cookie (or other data) if need be.


Solution

  • The script you mentioned will not work with the current version of GA (Universal Analytics) which uses neither the utm.gif nor stores data, besides a client id, in cookies (it uses a single cookie names "ga" that stores a single value, all processing is done serverside. The old version used to to a log of preprocessing clientside).

    To record a transaction at at later date store the client id. If you do transaction tracking with the javascript code you can pass the client id in to the method that creates the tracker (ga("create"....)). The client id is used to group multiple visits into sessions and to assign multiple session to a user, so if you use an existing client id the transaction will be associated with that user.

    You might also want to look into the measurement protocol, which allows you to do the tracking serverside.