Go Back   WarriorForum - Internet Marketing Forums > The Warrior Forum > Adsense / PPC / SEO Discussion Forum
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 01-01-2012, 10:52 AM   #1
Still im untangible
War Room Member
 
high_plains_drifter's Avatar
 
Join Date: Sep 2010
Location: London
Posts: 559
Thanks: 68
Thanked 52 Times in 36 Posts
Social Networking View Member's Twitter Profile 
Contact Info
Send a message via MSN to high_plains_drifter Send a message via Yahoo to high_plains_drifter Send a message via Skype™ to high_plains_drifter
Tip How To Stop Google Analytics From Tracking Your Own Visits To Your Website

I recently created this post on my new blog, and thought i would share it here.
If you want to share the post on your own blog or whatever the link is here - How To Stop Google Analytics From Tracking Your Own Visits To Your Website (i'd much appreciate the organic link building as part of my case study)



Step 1

First log in and open your Google analytics account (http://www.google.com/analytics) and navigate to your site.



Step 2

On the right hand side you will see a cog symbol, click on this to open the settings.


Step 3

You will see the following text just above your default url: Web Property ID: UA-xxxxxxx-x . Copy this code (Just the UA-xxxxxxx-x).
Keep this tab open as we will need it later.



Step 4

Open notepad.



Step 5

Then paste the following code into notepad and replace UA-xxxxxxx-xx with your own UA code.
Code:
<script type=”text/javascript”>
 var _gaq = _gaq || [];
_gaq.push(['_setAccount', ' UA-xxxxxxx-x']);
_gaq.push(['_trackPageview']);
 (function() {
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);
})();
 </script>
<body onLoad=”javascript:pageTracker._setVar(‘test_value’);”>




Step 6

Now click File > Save As


Name the file something obscure and something a user is unlikely to type into their web browser when on your site, I just hit the keyboard randomly to do this. Add ‘.html’ to the end and click save.






Step 7

Now upload this file into the home/public_html directory via ftp. You will know when you are in the correct directory as you will see your standard wordpress folders: wp-admin, wp-content, wp-includes.






Step 8

Now we need to create a custom filter in Google Analytics. Go back to the tab where you got your UA-xxxxxxx-x code from and click on Filters > + New Filter






Step 9

Now enter the same information you see in the screenshot below and click Save.






Step 10

Navigate to the page that you uploaded. For example mine would be something like this -
http://www.internetmarketinghustle.c...-the-file.html


You should just see a blank white page.


That’s it you are done, you have successfully excluded your activity from Google Analytics.


Remember: You will have to visit this page each time you clear your cookies in your browser, so be sure to bookmark the page for future reference

Step 11

Just to double check you have done it right, visit the page a few times, refresh the page 5-10 times. Give it 1-2 hours (it can take up to 24 hours for stats to appear, please bear this in mind) and check that your activity has not been tracked by having a look in the ‘Content’ section of Google Analytics.

high_plains_drifter is offline   Reply With Quote
Old 01-01-2012, 12:46 PM   #2
www.metasmash.com
 
lukedidit's Avatar
 
Join Date: Dec 2011
Posts: 300
Thanks: 69
Thanked 47 Times in 32 Posts
Social Networking View Member's Twitter Profile 
Default Re: How To Stop Google Analytics From Tracking Your Own Visits To Your Website

Fanatasic job, I was also meaning to get round to finding out about this.

Are you an Amazon Affiliate?
Don't risk having your account shutdown!
Use my Free Plugin to insure your website is compliant with the Amazon Affiliate Agreement.
lukedidit is online now   Reply With Quote
Old 01-01-2012, 12:50 PM   #3
www.metasmash.com
 
lukedidit's Avatar
 
Join Date: Dec 2011
Posts: 300
Thanks: 69
Thanked 47 Times in 32 Posts
Social Networking View Member's Twitter Profile 
Default Re: How To Stop Google Analytics From Tracking Your Own Visits To Your Website

Just to add to this - I have multiple sites under my GA account, so you can repeat the process but change the pageTracker var each time:

Code:
<body onLoad=”javascript:pageTracker._setVar(‘site_one’);”>
Code:
<body onLoad=”javascript:pageTracker._setVar(‘site_two’);”>
And then change the filter pattern each time for the new pageTracker.

The only short fall about this is I tend to hit my pages with incognito mode or private mode a lot, so I will still be tracked. To get around this I will bookmark the script pages and just call them up each time.

Are you an Amazon Affiliate?
Don't risk having your account shutdown!
Use my Free Plugin to insure your website is compliant with the Amazon Affiliate Agreement.
lukedidit is online now   Reply With Quote
Old 01-01-2012, 12:52 PM   #4
HyperActive Warrior
 
Join Date: Aug 2011
Posts: 170
Thanks: 62
Thanked 9 Times in 9 Posts
Default Re: How To Stop Google Analytics From Tracking Your Own Visits To Your Website

Thanks. Ill bookmark this and share to my social accounts. I have been meaning to do this for awhile now.
discustipated is offline   Reply With Quote
Old 01-02-2012, 09:29 AM   #5
Still im untangible
War Room Member
 
high_plains_drifter's Avatar
 
Join Date: Sep 2010
Location: London
Posts: 559
Thanks: 68
Thanked 52 Times in 36 Posts
Social Networking View Member's Twitter Profile 
Contact Info
Send a message via MSN to high_plains_drifter Send a message via Yahoo to high_plains_drifter Send a message via Skype™ to high_plains_drifter
Default Re: How To Stop Google Analytics From Tracking Your Own Visits To Your Website

Quote:
Originally Posted by lukedidit View Post
Just to add to this - I have multiple sites under my GA account, so you can repeat the process but change the pageTracker var each time:

Code:
<body onLoad=”javascript:pageTracker._setVar(‘site_one’);”>
Code:
<body onLoad=”javascript:pageTracker._setVar(‘site_two’);”>
And then change the filter pattern each time for the new pageTracker.

The only short fall about this is I tend to hit my pages with incognito mode or private mode a lot, so I will still be tracked. To get around this I will bookmark the script pages and just call them up each time.
thats a great idea

high_plains_drifter is offline   Reply With Quote
Old 01-02-2012, 02:06 PM   #6
Active Warrior
 
Join Date: Oct 2010
Location: Nigeria
Posts: 37
Thanks: 11
Thanked 4 Times in 4 Posts
Social Networking View Member's FaceBook Profile 
Default Re: How To Stop Google Analytics From Tracking Your Own Visits To Your Website

Again, thanks very much for this tutorial. I'll try it out and if it works I'll post it on my site.

Henlus is offline   Reply With Quote
Old 01-02-2012, 02:25 PM   #7
Dental Insurance Dude
 
Join Date: Dec 2011
Posts: 18
Thanks: 2
Thanked 2 Times in 2 Posts
Default Re: How To Stop Google Analytics From Tracking Your Own Visits To Your Website

The "old" version of GA allowed you to filter by IP address. I haven't tried this filter with the updated version, so I may give this a shot. Thanks for sharing!

Joseph Denali is offline   Reply With Quote
Old 01-02-2012, 04:14 PM   #8
Still im untangible
War Room Member
 
high_plains_drifter's Avatar
 
Join Date: Sep 2010
Location: London
Posts: 559
Thanks: 68
Thanked 52 Times in 36 Posts
Social Networking View Member's Twitter Profile 
Contact Info
Send a message via MSN to high_plains_drifter Send a message via Yahoo to high_plains_drifter Send a message via Skype™ to high_plains_drifter
Default Re: How To Stop Google Analytics From Tracking Your Own Visits To Your Website

Quote:
Originally Posted by Joseph Denali View Post
The "old" version of GA allowed you to filter by IP address. I haven't tried this filter with the updated version, so I may give this a shot. Thanks for sharing!
yes the old 'filter by ip' trick is only useful to those who have a static ip.

Most of us home internet users do not have this, so this is the most effective way of blocking your own traffic.

high_plains_drifter is offline   Reply With Quote
Old 01-02-2012, 04:29 PM   #9
HyperActive Warrior
War Room Member
 
Join Date: Apr 2011
Location: newjersey usa
Posts: 444
Thanks: 142
Thanked 29 Times in 26 Posts
Default Re: How To Stop Google Analytics From Tracking Your Own Visits To Your Website

wow, that is wild but risky in my opinion.

MY DOMAIN IS FOR SALE
BESTIMCOACH.COM
tristatemedia is online now   Reply With Quote
Old 01-03-2012, 12:30 AM   #10
Advanced Warrior
 
StoneWilson's Avatar
 
Join Date: Mar 2011
Posts: 693
Thanks: 69
Thanked 30 Times in 30 Posts
Default Re: How To Stop Google Analytics From Tracking Your Own Visits To Your Website

Nice work. But I don't think Google Analytics data is that acurate, so I won't mind if it counting my visiting data. lol~

StoneWilson is offline   Reply With Quote
Old 01-03-2012, 01:14 PM   #11
Still im untangible
War Room Member
 
high_plains_drifter's Avatar
 
Join Date: Sep 2010
Location: London
Posts: 559
Thanks: 68
Thanked 52 Times in 36 Posts
Social Networking View Member's Twitter Profile 
Contact Info
Send a message via MSN to high_plains_drifter Send a message via Yahoo to high_plains_drifter Send a message via Skype™ to high_plains_drifter
Default Re: How To Stop Google Analytics From Tracking Your Own Visits To Your Website

Quote:
Originally Posted by tristatemedia View Post
wow, that is wild but risky in my opinion.
what exactly is risky?

Quote:
Originally Posted by StoneWilson View Post
Nice work. But I don't think Google Analytics data is that acurate, so I won't mind if it counting my visiting data. lol~
If you dont have a lot of traffic already then you own stats can make the overall site statistics very misleading

if you are getting 1000's of visit per day a few from yourself isnt really going to make that much difference.

But for new sites this is a must!

high_plains_drifter is offline   Reply With Quote
Old 01-03-2012, 02:26 PM   #12
Took the red pill
 
Maraun's Avatar
 
Join Date: Dec 2011
Posts: 253
Thanks: 8
Thanked 46 Times in 36 Posts
Default Re: How To Stop Google Analytics From Tracking Your Own Visits To Your Website

There are also some free Wordpress plugins that don't report visits from certain users to GA at all, so there is no need to filter in GA itself later.
Maraun is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > The Warrior Forum > Adsense / PPC / SEO Discussion Forum

Tags
analytics, google, stop, tracking, visits, website

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 02:35 PM.