Search code examples
javascriptcookiesgoogle-analyticschartbeat

Google analytics vs. chartbeat analytics


I am using Google analytics page views tracking with ga.js. I am getting a significantly lower current users statistic than with Chartbeat (I put it in for comparison). Only the page views with a cookie to allow for it are sent to Google analytics, same with Chartbeat. Yet there's like a 200% difference.

I am using this code for GA (ofcourse I first check for cookie existence):

_gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-59585362-2']);
_gaq.push(['_trackPageview']);
createAnalyticsScript();

var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

This code is directy copied from Google.

Does anyone have an idea why I get such different statistics (GA is not tracking all of my page views)?


Solution

  • Doubled other metrics?

    If there is 200% difference, dont you have doubled chartbeat?

    What is cookie to allow?

    Is that something like user opt-out parameter? So it tracks only users who agreed to be tracked?