7 Steps To Succeed With Email Marketing
17 September 2020
How SA's Events Industry Can Survive During #LightSARed
16 September 2020
6 Essential Productivity Tools Every Solopreneur Must Use
16 September 2020
10 Lead Magnet Ideas for Your Website
15 September 2020
Trending Music Hashtags To Get Your Posts Noticed
24 August 2018
Trending Fashion Hashtags To Get Your Posts Noticed
05 April 2018
Trending Beauty Hashtags To Get Your Posts Noticed
05 July 2018
Trending Wedding Hashtags To Get Your Posts Noticed
18 September 2018
How To Track Visitors Across Multiple Subdomains In GA
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
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
- 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.
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.
If you want to know more about improving your tracking solutions don’t be shy we’re happy to assist. Simply contact us here