Question

I'm testing Google Analytics Event tracking with my local server.

I'm using the debug version of ga.js, ga_debug.js, in order to print debug text automatically in my browser console. Furthermore, i set domain name to none, which is supposed not sending the data to your Analytics account (stackoverflow post):

_gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
_gaq.push(['_setDomainName', 'none']);
...

But my events tracked are still sent to my Analytics Account, so my question is how to avoid this? Is the _gaq.push(['_setDomainName', 'none']); disable data sending only for page view and not event tracking?

Thanks for your help,

Xavier

Was it helpful?

Solution

Add the following snippet to your dev environment:

window['ga-disable-UA-XXXXXX-Y'] = true;

For more information read https://developers.google.com/analytics/devguides/collection/gajs/#disable

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