Cross-domain tracking in Google Analytics can be a very valuable asset in your data collection strategy, as it will help you track a single user throughout multiple web properties. In order to implement it properly, you should first ask yourself if you even need to implement cross-domain tracking.
Google Analytics generally assigns each domain a unique tracking ID for each property. This ID is stored in a browser cookie and tracks the user across a specific domain. As they travel to a new domain, there’s a new ID assigned, and the new data is sent to a different analytics dashboard.
Normally you would want your domains to track their users separately, but there are occasions where you need cross-domain tracking to prevent the domains from being referrers to each other, and give you a consolidated view of the data.
The most common use for cross-domain tracking is when a different domain assigned to regional websites (like BuyPantsUSA.com and BuyPantsUK.com) or you have different domains for different sections of your site (like buypants.com and buypantsblog.com).
Another common use is when you are using a 3rd party payment processor where the user needs to leave the site momentarily to complete a transaction. Cross-domain tracking will allow you track the user as if it was just one site journey instead of across multiple domains.
If you’re looking to implement cross-domain tracking in Google Analytics, here are 10 best practices you’ll want to follow.
Don’t Use Cross-Domain Tracking For Subdomains
If you’re just looking to track users across subdomains, like store.buypants.com and blog.buypants.com – you don’t want cross-domain tracking, you want sub-domain tracking which is a very different setup.
Ensure You’re Using Universal Analytics
If you’ve used Google Analytics for a little while (pre-2015) you may have some old tracking code that’s not compatible if you haven’t updated it in a while. Your account has probably been transferred to the new Universal Analytics, but the old code will still work, it just won’t provide the new data. This is almost certainly not an issue for general tracking, but you’ll want to implement the new code to get full benefits of proper cross-domain tracking. Or better yet, now is the perfect time to use Google Tag Manager.
Use Google Tag Manager
This is not a “must”, but it’s a highly recommended best practice. Google Tag Manager really makes it easy to implement and edit analytics information on your site. On top of that, it cuts down on the work required to insert Adwords and other 3rd party tags for tracking. Even if you’re just using it for Google Analytics it’s worth a look.
Have a Checklist
The easiest way to make sure you’re implementing things correctly is to create a simple spreadsheet with each domain you’re linking. You’ll want to list all your steps to ensure each property has the settings required. Check them off as you implement each piece on each domain. This due diligence now can save you major headaches tracking issues. The list will also help you troubleshoot cross-domain tracking problems if any arise.
Drop the WWW
There are a million reasons why you shouldn’t be using www in front of your web address anymore (www.buypants.com instead of just buypants.com). Here are 10 good reasons, but especially don’t do it when linking domains to cross-track. You’ll want to just use the domain without the www in order to avoid some issues.
Don’t Forget To Exclude Referrals
One area that has seen a lot of improvement in Google Analytics is the ability to filter out self-referrals. This is done through the implementation of the referral exclusion list. When cross-linking domains, you want Google to treat the linking of two domains the same as the linking of two pages on the same domain. The referral exclusion list will stop separate domains that you’re linking from counting as referrals.
Collect Data to the Same Google Analytics Property
This is sort of the whole purpose of what you’re trying to achieve, so you’ll want to make sure that you’re collecting data to one account. It sounds silly, but double check your tracking ID across all of your sites, especially if you were using a legacy code with different tracking numbers. They’re easy to miss, and could cause a host of issues.
Test Your Implementation
Never assume everything is working as intended. You don’t want to get six months into tracking before you realize it wasn’t set up 100% accurately. You can use the real-time tracking feature as validation once you’re set up, but that’s just an initial look. You’ll want to check in the next day to ensure things like source and medium are carried over correctly. Never assume.
Use Google Tag Assistant
Google Tag Assistant will validate your Analytics code (Adwords as well). It won’t tell you if you’ve set up cross-domain tracking correctly, but it will show you a lot of useful info. Most notably, you’ll be able to see if you have the right property listed in the tag validator. It will also give you any red flags with your implementation.
Be Careful With Multiple Trackers
Lastly, if you’re using multiple analytics tracking codes on a website, you need to pay extra attention to sure you’re not accidentally undoing all your hard work. It’s not uncommon to send data from one domain to one analytics property, and the have a roll-up account where you send all cross-domain tracking data. It’s a little too complicated to get into here, but just know that one tracking code can overwrite the other. Check out this guide to avoid the pitfalls.
Subscribe to receive the latest analytics tips and industry news.
Error: Contact form not found.
Best practices are just meant to help you avoid some common pitfalls. If you’re looking for some in-depth help, you’ll want to contact a professional. We know just the people that can help!