Brian,
You are widely known as the Google Analytics guru. We're using 6.x-3.0 http://drupal.org/node/921000 and the stats aren't what I expected. Usually GA either works or it doesn't. It is tracking, but comparing the stats to Apache logs, there is a HUGE discrepancy in the numbers - more than we can account for using our filters ( internal company IP traffic and staging site traffic ).
Here's what we've done that isn't standard:
1) Added filters for corporate traffic and to exclude staging sites
2) Added this code before the snippet in the "Advanced Javascript" section _gaq.push(['_setDomainName', '.domain.com']);
We selected " site running multiple subdomains " as our params as this site actually does run a store and a staging site.
Poking around, I also saw mention of regex on the filter, but we're using standard ones. The GA interface doesn't let you put in \ at all...so I don't think it's that.
When we upgraded from 6.x-2.3, we did uninstall and reinstall too...saw the nodes about that one. I assume the GA code that says async=true means it's using the new version of the code....so it shouldn't be a mismatch of code types.
So, oh sage one, do you have any ideas (or anyone else out there with bright ideas)? I'm scratching my head here...
Angela
Comments
The #1 reason
I love your sense of humor. :-)
The #1 reason why one would see a discrepancy between raw logs and Google has to do with the method of data collection.
1. Apache will record everything, including bot hits, image hits, cron.php hits, etc.
2. Google will only work if cookies and Javascript are working.
A. Can you clarify "HUGE" discrepancy? Are we talking about a 100x or 10x or 2x difference?
B. Which tool are you using to analyze the apache logs? There is a good chance this tool doesn't understand between a "hit" and a "visitor".
C. Have you gone to the page as anonymous user to verify the GA .js code is present when you view HTML source?
Yep to both
Yes, I realize Apache logs will count everything....I did consider that. But after talking to a colleague, they are seeing the same discrepancy with email clickthrough rates and the google stats too.
Google doesn't count image and cookie downloads? Is there somewhere with a list of what it counts and doesn't? I was looking for info like that earlier today.
"HUGE" as in Webalyzer says 41K and Google says 2K. Like I said, we can account for some of that, but not nearly all.
I did some checking, our main site is using the old GA code and the stats seem much more in line with what was expected. There is also discussion about async not working with 6.x-3.0 http://drupal.org/node/921308 because of hook_footer code getting removed? Apparently this seems to be something they don't plan to fix for D6 (which to me entirely defeats the purpose of having a release...since it doesn't work...).
I'm also irritated that they have a "known issues" section right on the project page but didn't list this, which seems like a pretty major snafu. Yay me for getting to waste lots of time on something that was known.
So now I guess I need to figure out if I'm going to downgrade and use the old GA code, or find a workaround for this issue or what. I was quite flummoxed because the code shows up on every page and it looks right...didn't realize that it being in the footer would entirely keep it from working?!
thanks for your patience
I had a chance to get up-to-speed with the GA 3.0 issue you referenced. Wow, it sounds like there is a little confusion about what's going on with with whole asynch thing. I would recommend a downgrade if at all possible until things get straightened out. Was there a feature in GA 3.0 that you needed ASAP?
Downgrading with DB change
No, we don't need the 3.0 functionality per se. But this module did require a db change. I'm a bit concerned about whether it will cleanly uninstall and reinstall on the previous version.
Just checking
I before I stuck my foot to far in my mouth, but I we are talking about the "Google Analytics" module at http://drupal.org/project/google_analytics
if we are while this module does reference the Drupal update hook, it does not use a database it stores all of its needed information with the "variable_set" API which makes the clean up easier and less of an impact, I am running through all of the variables now but I don't see any that are not removed during the uninstall. I am also checking for compatibility between them but I don't see any issues
so it looks like a few of the variables get renamed you could build a reverting module or rename the vaiables or uninstall the module as it looks like all of the variables are removed
Shawn
Thanks a ton
Thank you for digging deeper into this. I did uninstall the 3.0 version and reinstalled 2.3. I should know if the stats are better in a couple of days.
Have a happy thanksgiving!