First time here? Check out the FAQ!
3

Disable Google Analytics for administrators.

I've been trying to think of a way to disable administrators from being tracked by Google Analytics. I don't want my analytics data tainted with my daily visits to check up on things, especially since traffic to my site is so low right now.

There are a number of solutions out there for excluding oneself on the Google Analytics side, but they all require some rather fragile workarounds (excluding a specific IP address, setting a cookie, etc.).

But then I realized that this problem could be solved much more reliably on the Askbot side: Simply do not display the Google Analytics Javascript for the administrator.

todofixthis's avatar
1.3k
todofixthis
asked 2012-05-14 10:51:03 -0600, updated 2013-01-22 09:14:47 -0600
edit flag offensive 0 remove flag close merge delete

Comments

1

Ok, will do the the next version. It's quite simple actually.

Evgeny's avatar Evgeny (2013-01-22 09:22:40 -0600) edit
add a comment see more comments

2 Answers

1

How about just using google opt-out browser plugin from Google? https://tools.google.com/dlpage/gaoptout

apg's avatar
167
apg
answered 2014-01-24 21:01:37 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

You can right now delete the google site verification key to disable the tracking.

We also can add the "enable/disable" switch too.

Evgeny's avatar
13.2k
Evgeny
answered 2012-05-14 11:07:48 -0600
edit flag offensive 0 remove flag delete link

Comments

This would work globally, but I prefer to disable it only for specific users (in this case, just me). In other words, Google Analytics should not be keeping track of my activities on the site, but it should be tracking everyone else.

todofixthis's avatar todofixthis (2012-05-14 15:18:57 -0600) edit
1

Ah, I see what you mean now, it is a very good idea. I am thinking of just automatically disable tracking for the admin accounts, what do you think? Would you ever want to track the administrators visits? Still, your anonymous visits will be counted - can't preclude that.

Evgeny's avatar Evgeny (2012-05-15 10:38:45 -0600) edit

That sounds plenty sufficient to me (I can't think of a case where you'd want to disable GA for a non-admin user anyway). It might be good if there were an option to enable/disable tracking of admin activity; once the site reaches critical mass, admins will likely (hopefully) spend just as much time participating in the community as they do moderating; at that point it might actually be more useful to include admin activity in GA.

todofixthis's avatar todofixthis (2012-05-15 16:20:05 -0600) edit
add a comment see more comments