Categories: Discuss Tracking and Implementation issues :

G.A. is double counting pageviews - why

Showing 1-7 of 7 messages
G.A. is double counting pageviews - why pfreiling 7/11/09 8:22 AM
A week ago I wanted to try GA as a free website analysis tool to replace the website tracking service i currently have been using for the past 4 years (paid annual service).  I know the data on the wundercounter is accurate.

What I have done is simply add the Google script into the same portion of my website where my wundercounter script is - one right after the other.

I have noticed that although the visitor count between the two trackers are almost dead on (usually out by 1 or 2), the pageview count for the GA is consistently just over double the pageview count of the wundercounter (which I know is accurate).

Why is GA doubling my pageview count?  Is its script somehow getting confused with the other script?  The wundercounter script does not seem to be confused by the arrival of the GA script.  I could confirm this double counting if GA would provide a detailed TX listing like my wundercounter service does - then I would be able to see that a google tracked count was x2 on each count.

Any ideas??2009-07-11

Actual stats of the last few days to show you what I mean:

Unique Visitor counts for the past 4 days (July 7 - 10):
WunderCounter:  54,42,28,31
GAnalytics:         58,43,29,34

Page Views for same 4 days:
WunderCounter:  109,85,50,70
G.Analystics:      225,168,105,158

(just over double the count)

Re: G.A. is double counting pageviews - why Caleb Whitmore @AnalyticsPros 7/11/09 1:58 PM

It sounds like you have two sets of the pageTracker._trackPageview(); method on your page.  Google Analytics pageview reports are based on the number of tracking hits for a given page initiated by the Google Analytics code on your site.  If you ahve the pageTracker twice it wouldn't inflate visits, but would inflate pageviews by 2x.

Check for this: simply view the source code when on your site and search for "pageTracker".  IF you find it twice - there's your problem.


-Caleb Whitmore
Re: G.A. is double counting pageviews - why pfreiling 7/13/09 9:50 AM
Thank you Calab,
I did a source code search on a couple pages - my busiest ones - and both had 2 hits for that word but they both are within the GOOGLE ANALYTICS inserted code.
try {
var pageTracker = _gat._getTracker("UA-xxxxxxx-1");
My other website tracking javascript code that immediately follows the GA script does not have an instnce of this word but i am wondering if the script is being called externally - i am not a java programmer... but this is the wundercounter script immediately below the GA code...
<!-- begin code -->
<img src="" width=1 height=1>
<script type="text/javascript" language="JavaScript">
var reF=document.referrer;
var wS=screen.width;
var hS=screen.height;
var cS=screen.colorDepth;
var hisl=history.length;
document.write('<img src=');
document.write('width=1 height=1>');
// -->
<!-- end code -->
I hesitate to remove this script right now as I am only trialing GA and dont want to lose the wundercounter daily stats just yet.  Can I REM out this script somehow without deleting it?
Re: G.A. is double counting pageviews - why pfreiling 7/13/09 10:20 AM
OK Calab...

That is weird.  I suspected what the problem was on friday and i made the changes to the location of the script on my website on FRIDAY.  I waited for sunday morning to see the GA previous day results to prove of the pageviews came inline with my Wundercounter.  It didnt since the GA counts were still double the count of the Wundercounter views.  BUT I just noticed that YESTERDAY's GA pageview count is completely in line with the Wundercounter counts!  I dont know why it took 2 days for the GA count to fall into line but it seems that all is fixed now.  I had my GA script in the master template of the website and not on the webpage beginning of body location.

Seems all is good now but thanks for the inside on how the trackers get their count.

I will keep my eye on this count for a few more days to feel confident this is fixed now.
Re: G.A. is double counting pageviews - why Caleb Whitmore @AnalyticsPros 7/18/09 10:15 AM
Glad to hear it sounds like the issue is resolved!

-Caleb Whitmore
Re: G.A. is double counting pageviews - why mdg333 7/22/09 1:08 AM
Hell, I've got three instances of it within the GA code.

var pageTracker = _gat._getTracker("UA-7249617-2");

Does that look right?
Re: G.A. is double counting pageviews - why Caleb Whitmore @AnalyticsPros 7/22/09 10:46 AM

Your code looks correct.  The "var pageTracker = ..." part defines what account number pageTracker will record traffic to.  The second "pageTracker._setDomainName..." defines the cookie domain for which the script will run (this means it will only work correctly if the script is running on pages on the "" domain.  The third pageTracker for "._trackPageview..." reports the pageview when the page is loaded.


-Caleb Whitmore