I just finished reading about Google Analytics cross-domain linking. All that has done for me is created more questions. I'm hoping to get some help understanding it all.
Our portal site is hosted at http://aq3.processmyquote.com. We create new websites using the first subdirectory as the site name. All secure traffic is directed to https://aq3.processmyquote.com/. For unsecured traffic, we allow our clients to specify an alternate domain name to use for their pages.
We have a single univeral analytics account for the entire site, and views for each client portal. Our issue is that sites which use an alternate domain name are getting tracked as referrals, and we're losing the organic keywords.
Here are some examples: http://www.autoquoter.com, http://www.idriveaffordable.com, http://www.venamex.com
Google's documentation on this states that I should include the autolinker on the main site, and add allowlinker on the secondary sites. How does that work with a web portal? The same tracking code is inserted into each site. Is it ok to just list all the possible domains when creating the tracker?
(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-XXXXXX-20', 'auto');
ga('require', 'linker');
ga('linker:autoLink',['www.autoquoter.com',
'www.idriveaffordable.com',
'www.venamex.com']);
ga('send', 'pageview');
This would be added to all of the sites, since they are all pointing to the same web site. The only difference is that the sites are skinned independently. I'm not sure how I would add the destination ga create code or if I even need to.
ga('create', 'UA-XXXXXX-X', 'auto', {
'allowLinker': true
});