GoogleGoogle Analytics

Exclude Internal Traffic From Google Analytics

There is a really simple way to make sure Google Analytics doesn’t count the visits coming from your own computer. If you visit your own site you don’t want to be counted as a visitor.

So you’ve set up a Google Analytics account to monitor your visitor count, among other things. You may not realise that every time you view your own site, your visit is being counted. Yes, I know. How annoying. You must have visited your own site about 20 times yesterday checking ‘likes and shares’.

You need to exclude internal traffic from Google Analytics immediately!

In a few illustrated simple steps I’ll explain how to filter out traffic from your own computer. It can be repeated on as many computers as you want. It won’t delete existing traffic stats on Google Analytics but it will exclude any further internal traffic showing up on your results.

Step 1


Give your computer a name. If you already have a pet name for your pc you can use that 😉 Call it ‘Work’ or ‘Home’ or ‘Bob’ or whatever you want. This unique word will be used to tell your browser who your computer is and not to count visits from that computer. You don’t have to do anything with this name yet. Just chose one. Here is how you identify the website you want to filter out.

  1. Go a page of the website where Google Analytics is installed.
  2. Copy and paste this code below into your address bar completely replacing the existing URL:
  3. Replace ‘Unique Word’ with the name you gave your computer. You may also need to retype javascript: at the beginning again as most browsers delete this automatically for some reason.
  4. Press Enter. A pop up should appear on your screen displaying the unique word. If it doesn’t then you need to take additional steps (see the end of this article for additional steps).

Code:
javascript:void(function(w){try{_gaq._getAsyncTracker()._setVar(w)}catch(e){try{__utmSetVar(w)}catch(e){pageTracker._setVar(w)}}alert(w)}(‘Unique Word‘));void(0);

Step 2


Tell Google Analytics what you have done. You do this by setting up a Filter.

  • Go to the Admin section of your Google Analytics account

google analytics admin

  • Choose from your accounts list if you have more than one.

google account list

  • Choose the Property (your website)…

google analytics property

  • Choose the Profile…

google analytics profile

  • Once you click on the Profile, you will see this screen…

author filter

  • Click on Filters and add a +New Filter

new-filter
Now we’re getting there! Create your filter settings. I’ve demonstrated it for you in the next image. Where I filled in ‘Unique Name’ make sure you enter the name you chose for your computer.

filter-settings

From here on in, any time you visit your website from that computer, the visit won’t be recorded. Repeat these steps for as many computers as you like. If you use more than one browser, you need to repeat the Javascript: code bit. The other steps don’t need to be repeated.

If the pop up box doesn’t appear

Now, I mentioned that the pop out box may not appear in your browser. This is because sometimes your browser can block script from running. In this case you need to do the following:

Google Chrome:

Go into settings on the top right corner of your browser. Select Tools > Javascript Console (or for keyboard shortcut junkies just hit Ctrl+Shift+J). A new half window will open up and you will see a flashing blue >. Paste the line of code after the blue arrow and hit Enter. Don’t forget to replace ‘Unique Word’ with your actual word. A pop up should appear displaying your unique word. Close the window. You’re done.

Firefox:

Do the same thing but you access the Javascript Console by going Tools > Web Developer > Web Console (or Ctrl+Shift+K for the junkies). You’re done!

Congratulations. You will now find that your website isn’t as popular as you thought it was! Sorry…

If this is new information and has helped you out please let us know in the comments below and make sure you spread the word! People are visiting their sites several times a day and not realising that they are adding to their visitor count. This goes for employees, web developers, blog writers and overly eager friends too! The discrepancy in numbers makes a massive difference to the stats of a new website. Every website owner should take these steps.


One thought on “Exclude Internal Traffic From Google Analytics

Leave a Reply

Your email address will not be published. Required fields are marked *