Google Analytics multi-site tracker stopped collecting stats Nov 1, individual single-site trackers still working

StackOverflow https://stackoverflow.com/questions/8539152

  •  18-03-2021
  •  | 
  •  

Question

I am using Google Analytics for a number of websites. I have one dedicated tracker for each site, as well as one global tracker (for network-wide stats). So each site is set up to use multiple trackers. I am loading Google Analytics asynchronously, and my tracker initialization code on each site looks like this:

var _gaq = _gaq || [];
_gaq.push(
    /* global tracker */
    ['_setAccount', 'UA-XXXXX-XX'],
    ['_setDomainName', 'none'],
    ['_setAllowLinker', true],
    ['_trackPageview'],
    ['_trackPageLoadTime'],

    /* dedicated site tracker */
    ['t1._setAccount', 'UA-YYYYY-YY'],
    ['t1._setDomainName', 'none'],
    ['t1._setAllowLinker', true],
    ['t1._trackPageview'],
    ['t1._trackPageLoadTime']
);

This was working great through Nov 1.

But starting Nov 2nd, the site trackers are all still working fine, but the global tracker just stopped collecting stats. It is reporting "0" visitors for almost every day since then (with the exception of Nov 2 itself and, oddly, Dec 9, each of which reported "1" visitor), down from hundreds of thousands of visitors each day through Nov 1.

I tried adding a prefix t0 to the global tracker like this:

var _gaq = _gaq || [];
_gaq.push(
    /* global tracker */
    ['t0._setAccount', 'UA-XXXXX-XX'],
    ['t0._setDomainName', 'none'],
    ['t0._setAllowLinker', true],
    ['t0._trackPageview'],
    ['t0._trackPageLoadTime'],

    /* dedicated site tracker */
    ['t1._setAccount', 'UA-YYYYY-YY'],
    ['t1._setDomainName', 'none'],
    ['t1._setAllowLinker', true],
    ['t1._trackPageview'],
    ['t1._trackPageLoadTime']
);

And gave it 48 hours, and still no help. Is there some new formatting requirement that I missed that this initialization code isn't following? Anything else that might explain this behavior?

Was it helpful?

Solution

Filters. Usually the culprit when data suddenly disappears.

Also, when you set up analytics is it always a good idea to create a raw profile that contains no filters. Use a second profile to add filters to. You can create multiple profile under the same account that uses the same tracking code so you do not have to add an additional ['t0._setAccount', 'UA-XXXXX-XX'] to your tracking code.

From How do I create a filter:

If you'd like to apply filters to your data while keeping your "raw" data intact, you can create a duplicate profile in your account. To do so, add a new profile using the Add profile for an existing domain option. When this option is selected, the tracking code generated for the new profile will be identical to the tracking code for the original profile, and data will be imported simultaneously into both. You won't need to change the tracking code on your site, and any filters applied to the first profile will not affect data in the second.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top