Google Analytics tag - where is this coming from?


I'm seeing this code on our Forum pages:

ga('create', 'UA-8909282-8', 'auto', 'master');
ga(function() {

ga.getAll().forEach(function(tracker) {

I have no idea what that account number is or where this is coming from, but I think it's throwing off our own GA tracking.  We do not have any value put into the GA field in our Analytics page:

It's not in our custom code or our themes.  

Suggestions on how to get rid of that?  

Dave V.


Photos (1)
Original Post

Activity Stream

Hi Dave,

You can't get rid of that; it's our internal tracking code for Google Analytics. It shouldn't matter, however; it will not affect your own Google Analytics ID. You can just enter your own Google Analytics ID in the control panel, and you'll be set (at the location of your screenshot). You do not need to include the full custom GA code, as handles that automatically. If you are including the full GA script code, it's possible that's the source of the issue.

Hope that helps!


Unfortunately, we can't just enter our own ID number as we need to customize our code more than that.  Our Analytics data all goes into the same bucket; we don't have a separate property ID for the Forums. 

I'll take a look and see if it's still going in, in which case there's no problem -- but I'm getting a warning from my Chrome GA plugin about having two tags on the same page.




I happen to be working on converting our GA code from analytics.js to GTM, and I just discovered: the way this is set up is double-counting traffic.  I'm getting two calls to GA for each pageview.  You can see it by using the Google Analytics debugger extension in Chrome.  Here's a screenshot:

Our GA code has already executed before this -- and as you can see, the way the GA code is firing when your hidden code gets executed, it's re-firing the previous call as well.  

The problem is, we can't just use the built-in GA form where we just put in the GA account number, as we have this set up as a subdomain and we need to pass in things like Channel and other custom vars we have set up in GA.  Otherwise we can't tell the homepage of our Forums from the homepage of our main website when looking at the path in GA.  Here's what our GA code looks like:


ga('send', {"hitType":"pageview","dimension1":"forums"});

Is there a way to modify or disable the auto-call that your built-in code does?  I think it's because it's doing the GA.getAll part, and that's re-calling the GA tag we've already created.  

Alternatively, I'm wondering if perhaps I should just modify our ga code so that last line just does a 'set' instead of a 'send' -- and then let your master getAll do the sending part.  Although I'm not 100% sure that it will send along the variables we're setting this way, as it doesn't seem to be doing that with the second GA call on the page.  Your thoughts?


Hi David,

I can't think of a way to disable or alter the built-in GA behavior in without a code customization.

I think you may be able to do what you're doing by using a unique trackerName. From the Google Analytics docs:

Try changing your code to:

ga('cigaraficionado.create', 'UA-XXXXXX-XX', '');
ga('cigaraficionado.require', 'linkid', 'linkid.js');
ga('cigaraficionado.send', {"hitType":"pageview","dimension1":"forums"});

And see if that does the trick. Since each of those is registered on a unique tracker (cigaraficionado), it should be independent of the default tracker is using and so you shouldn't get double counting anymore.

Hope that helps!


Thanks, Brian -- what I ended up doing is changing that 'send' to 'set', and then allow your send loop to send both ours and yours.  It appears to be working, if you check out the Forums now.  Not seeing a second pageview anymore -- do you?

Add Reply