Question

I have a webshop where users come from many different other sites and newsletters. To track where the people came from, we use campaigns in Google Analytics. Now we are implementing our own external payment site.

After a user places an order, they will be redirected to our payment site. After a succesfull payment, they should be redirected back to the original site. On the original site the ecommerce values will be fired into Google Analytics.

When I do this like I described above, I lost the campaign when insterting the ecommerce data. How do I make sure this information isn't lost?

[edit]
I found adding 'utm_nooverride' should to the trick. However, I can't find it clearly in the Google Analytics documentation

Was it helpful?

Solution

To solve the above:

On both sites (yes, the payment site should have a GA too), you need to set _setAllowLinker to true, and the _setDomainName to 'none'.

IE:

<script type="text/javascript">

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-XXXXX-YY']);
    _gaq.push(['_trackPageview']);

    _gaq.push(['_setAllowLinker', true]);
    _gaq.push(['_setDomainName', 'none']);

    (function () {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
</script>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top