1

I have 3 websites. One that I host in Azure and two that are hosted by Hubspot.

https://example.com
https://blog.example.com
http://info.example.com

I have set up cross domain tracking using the Official Linker plugin. My analytics for each of these domains looks like this.

            main site
            ga('create', 'UA-xxxxxxxx-x', 'auto', { 'allowLinker': true });
            ga('require', 'linker');
            ga('linker:autoLink', ['https://blog.example.com/', 'http://info.example.com/']);
            ga('send', 'pageview');

            blog site    
            ga('create', 'UA-xxxxxxxx-x', 'auto', { 'allowLinker': true });
            ga('require', 'linker');
            ga('linker:autoLink', ['https://example.com/', 'http://info.example.com/']);
            ga('send', 'pageview');

            info landing pages    
            ga('create', 'UA-xxxxxxxx-x', 'auto', { 'allowLinker': true });
            ga('require', 'linker');
            ga('linker:autoLink', ['https://example.com/', 'http://blog.example.com/']);
            ga('send', 'pageview');

From reading the linker plug in documentation, one of the lines says

Important: for cross-domain tracking to work properly, you must ensure all domains are included in the Referral Exclusion list as described in the cross-domain tracking guide.

And it links to The referral exclusions documentation

In here it states When you initially set up your Analytics property, your domain is automatically added to the referral exclusion list. As a result, you shouldn't see self-referrals if you have a web property that tracks multiple subdomains.

So does this mean I have my analytics set up correctly? I'm logged into analytics and I'm on my main example.com property. But I see no way to add an additional URL to track. Currently these sites are all set up as different properties under a single account.

And if I do have them set up correctly, is there anything else I need to do to make sure that users who go from https://example.com to https://blog.example.com are counted as a single session and not as multiple sessions? I want to be able to see user flow because we have a lot of users who bounce back and forth between the main site and the blog and I want to make sure these users are counted as a single session.

1 Answer 1

0

Sub-domain tracking is automatic as long as you have specified your cookieDomain as auto. You can read more about that here: https://www.simoahava.com/analytics/cross-domain-tracking-across-subdomains/

Having done so, you won't require any additional tracking for users between your main site and blog. Make sure you have also included the hostname (via View filter) so that you can also see which subdomains your users are visiting, and also include separate views for each subdomain so that you can see traffic for specific subdomains.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.