Ask Your Question
3

Disable Google Analytics for administrators.

asked 2012-05-14 10:51:03 -0500

todofixthis gravatar image

updated 2013-01-22 09:14:47 -0500

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.

edit retag flag offensive close merge delete

Comments

1

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

Evgeny gravatar imageEvgeny ( 2013-01-22 09:22:40 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-01-24 21:01:37 -0500

apg gravatar image

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

edit flag offensive delete link more
0

answered 2012-05-14 11:07:48 -0500

Evgeny gravatar image

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

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

edit flag offensive delete link more

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 gravatar imagetodofixthis ( 2012-05-14 15:18:57 -0500 )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 gravatar imageEvgeny ( 2012-05-15 10:38:45 -0500 )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 gravatar imagetodofixthis ( 2012-05-15 16:20:05 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-05-14 10:51:03 -0500

Seen: 437 times

Last updated: Jan 24 '14