Posted by Tom.Capper
Out of the box, Google Analytics handles being deployed across multiple domains or subdomains extremely poorly. This is easily the most common critical problem in Google Analytics, despite its being relatively easy to fix.
Depending on your situation, one or more of a few simple steps may be appropriate. Look for the entry in the left-hand column below that best describes your situation, and make sure you’ve taken the steps listed on the right:
|Multiple subdomains or domains, which are treated as separate sites|
|Multiple subdomains on a single domain which are treated as a single site|
|Multiple domains with one or more subdomains that are treated as a single site|
As a word of warning, several steps in this document differ according to the tracking code in use, and in these cases I suggest options for each tracking code type. If you’re unsure of your current implementation:
- ga.js / doubeclick.js: Your source code will contain several “_gaq.push” commands
- analytics.js tracking code: Your source code will contain “ga(‘create'” and “ga(‘send'” commands
- Google Tag Manager: You have an analytics tag in your Google Tag Manager account (which I will assume is set to “Universal Analytics”)
If you have updated your Google Analytics interface to Universal Analytics but you’re still using the old code, you should follow the recommendations for the old (ga.js / doubleclick.js) tracking code here.
Using separate tracking IDs
Tracking IDs are the unique codes that you’re given when you create a Google Analytics property, and look something like “UA-123456-1”. Any page with that tracking ID, regardless of the site it’s on, will send data to that property.
While it is possible …read more