The _link method is to transfer Google Analytics cookies from your first domain using the query string to the second domain. The second domain, if configured correctly, will accept these URL parameters and use them as cookie values for tracking purposes.
So, it’s easy for you to use your own version of the _link function.
In particular, the _link function transmits the following cookies:
__utma , __utmb , __utmc , __utmx , __utmz , __utmv and __utmk
To the query string as such ?__utma=87278922.614105561.1288923931.1294376393.1298325957.6&__utmb=87278922.1.10.1298325957&__utmc=87278922&__utmx=-&__utmz=87278922.1288923931.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)&__utmv=-&__utmk=72493274
So, all you need to do to replicate the _link function is before you apply server-side redirection, grab the cookie values and apply them as a query string in the URL you are redirecting to.
Now, this is not the only thing you need to do to make it work. The configuration of Google Analytics on the payment site should be configured with the _setAllowLinker parameter _setAllowLinker to true, and also potentially disable the domain hash and set a specific domain name for tracking files; it depends on your configuration. For more information, see the Google Analytics Cross-Domain Tracking Guide .
Yahel
source share