2
votes

I recently integrated Google Universal Analytics to our sites. We have a 3rd party booking engine that goes to a different domain so we utilize cross-domain tracking to pass the cookie through in Analytics.

Once I switched everything over on both sites it seems the cookie is resetting and all ecommerce traffic on the 3rd party site says its "Direct" traffic now instead of whatever medium it should've been. My guess is the cookie isn't passing through correctly but I can't find the solution.

  1. I added both domains to the Referral Exclusion List in the Admin already.
  2. The Universal Analytics code is on both domains.

Here is the current script

    <script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-23854194-1', 'auto', {
        'allowLinker': true
    });
    ga('linker:autoLink', ['a.com', 'b.com'], true, true);
    ga('require', 'linker');
    ga('send', 'pageview');
    </script>
1
Is the _ga parameter transmitted via the url if you switch from one domain to another (maybe there are rewrites that stripe the parameter) ? - Eike Pierstorff
It's a possibility as we have to pass through multiple variables in the URL. If you go to westgatedestinations.com and click on "Find Rates" you'll see what happens. - dsmelick
Adding the sites, to which you have set up for your cross domain tracking, to the referral exclusion list will do exactly what you have observed: reattribute referral source to direct. - nyuen
@nyuen, not true with cross domain tracking: "To prevent new referral campaigns from being generated when users navigate across domains, you must add an entry for each domain you wish to track across in the Referral Exclusion list. For example, if your default URL was configured as source.com, and you need to track a user across both source.com and destination.com, you will need to add destination.com to the referral exclusion list." (from here: developers.google.com/analytics/devguides/collection/…) - Eike Pierstorff
Thanks for clarifying @EikePierstorff! - nyuen

1 Answers

3
votes

When I looked at the console while browsing your page I saw the following error message:

Tracker does not have any plugins.log 
Error calling a plugin method: {0:
"linker:autoLink", 1: ["westgatedestinations.com", "ihotelier.com"],
2: true, 3: true}

The problem seems to be that you call the plugin before you include it, so if you switch the "require" and the "autolink" call it might work.