Recent posts
Shopaholics
43 Black Friday Software Deals 2024
10 November 2024
Athletes
How SA Football Coaches Are Transforming Communities
06 November 2024
Money Talks
Is Blockchain The Future Of Finance?
05 November 2024
Industry Experts
How to Use Videos to Accelerate Your Sales Pipeline
28 October 2024
Popular posts
Extravaganza
Trending Music Hashtags To Get Your Posts Noticed
24 August 2018
Geek Chic
How To Fix iPhone/iPad Only Charging In Certain Positions
05 July 2020
Extravaganza
Trending Wedding Hashtags To Get Your Posts Noticed
18 September 2018
Money Talks
How To Find Coupons & Vouchers Online In South Africa
28 March 2019
How To Track Visitors Across Multiple Subdomains In GA
22 March 2017 | 0 comments | Posted by Che Kohler in nichemarket Advice
As an SEO nothing breaks my heart more than the improper use of a subdomain or multiple subdomains. In my time I've seen a string of common mistakes when using multiple subdomains. Poor use of multiple subdomains causes a split site's authority, duplicating content or worse having domains penalised and having entire sites de-indexed by search engines. It basically, makes a SEOs work twice as hard.
Don't get me wrong, I have nothing against subdomains and when used with consideration for search engines it can give provide your site with a powerful weapon. A subdomain can give you an edge over competitor sites by offering your site improved load balancing, speed improvements as a content distribution network or a superior mobile experience but that's a post for another day.
In this post, I'll be handling how to tracking visits across multiple subdomain architectures. If you're already running multiple subdomains and want to improve the quality of your data, I'll take you through how to combine your all your sites into one Google Analytics view.
If you have a multiple domain setup check out our article How To Track Your Visitors Across Multiple Domains In GA
What is a subdomain?
A subdomain is an internet domain which is part of a primary domain. It is an entirely new website, with its own unique content and attributes, but instead of a new domain name. It lives off the top level domain as an extension. Examples of a domain with subdomains are:
- Top-level domain: www.nichemarket.co.za
- Subdomain: media.nichemaket.co.za
- Subdomain: dashboard.nichemarket.co.za
Examples of subdomains - Image by pi-datametrics.com
Why do subdomain cause tracking issues?
The problem is no matter what it looks like or what you use it to search engines and reporting tools it's seen as a completely different site and is handled as such. If you have multiple subdomains you will more than likely have multiple Google Analytics accounts to track each domain separately, which isn't ideal as it fragments your data sets and makes analysis a nightmare. To complicate things even further is the fact that there is a complete disconnect between visitors.
When actually putting together reports you have no way of attributing which traffic came from which sources as traffic that moves from one domain to another will be grouped together as referral traffic. Skewing your data and rendering it almost useless. There are ways to get around this issue but unless you're a reporting whizz and can set up complicated attribution models or you can dev a unique identifier cookie you were out of luck. Until now, with subdomain tracking, you simply slap on some extra code to your current GA script and it does all the heavy lifting for you.
How to track subdomains in Google Analytics
1.Google Analytics Cookie Domain Setup
Add the following script with your Google Analytics ID into the head tag of all pages across all your subdomains
(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-XXXXXXX-Y', 'auto');
ga('send' , 'pageview');
1. Google Tag Manager Setup
- Install Google Tag Manager Snippet on all of your domains and create the tag in each subdomain container
- Open up your Google Tag Manager account
- Create a new tag
- Select Universal Analytics as the tag type
- Add your Google Analytics Tracking ID
- Select page view as the track type
- Click more settings
- Click
field to set - Set field name to cookieDomain and value to auto
- Set firing trigger to page view, all pages
- Save your tag and publish
2. Referral Exlusion list
This should be setup by default already, but it’s worth double-checking. In the Admin Panel, the root domain must be added to the Referral Exclusion List. This is an important step in the process because when the user moves from one domain to another (including subdomains of the same domain), the Universal Analytics code will send referrer information to Google Analytics.
When Google Analytics sees a new referrer that is different from original source/medium information, it will start a new session with the new traffic source information. The Referral Exclusion List prevents this from happening and will let the original session continue.
Subdomain syncing
If you have a subdomain site structure without syncing tracking, how have you been handling your reporting? Do you feel this would be a better option for you? Let us know in the comments below.
Contact us
If you want to know more about improving your tracking solutions don’t be shy we’re happy to assist. Simply contact us here
Tags: Data Analysis, google analytics, google tag manager, tracking
You might also like
5 Hacks To Enhance Your Return on Investments
21 October 2024
Posted by Jessica Williams in Money Talks
Discover proven strategies to maximize your investment gains. Learn how to make your money work harder for you through smart financial choices and ex...
Read moreIs Blockchain The Future Of Finance?
05 November 2024
Posted by Josh Welman in Money Talks
An introduction to blockchain technology and distributed ledgers and why they are becoming a popular option for transacting value in our modern globa...
Read more{{comment.sUserName}}
{{comment.iDayLastEdit}} day ago
{{comment.iDayLastEdit}} days ago