Cross-Domain Cookies with Google Analytics

At work, we’ve been trying to determine how much audience overlap we have between two of our main websites. We’ve migrated to Google Analytics Premium this year and are creating a “roll-up” property where all analytics from all of our properties gets rolled into one.

After enabling the roll-up, we tried to run reports on how many users visited both sites, but came back with 0 users. After doing some research we discovered Google Analytics by default will use first-party cookies to identify users. However, first-party cookies are not accessible (without crazy work arounds) across domains.

It is more resonable to “write” cookies to multiple domains with some resonable solutions. With Google Analytics Premium, however, it is completely possible to have GA do all the heavy lifting for you.

The solution is to use Google Analytic’s auto linker to support Cross-Domain cookies. This will allow GA to smartly link users across both domains. The setting must be set on all tags for each site. Example config:

ga('create', 'UA-XXXXXXX-Y', 'auto', {'allowLinker': true});
ga('require', 'linker');
ga('linker:autoLink', [''] );

Hopefully this will provide useful for someone.

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close