It’s important to exclude your own visits when analysing your trafic via Google Analytics. The reason is obvious really, you do not want to contaminate your trafic data with your own visits, as this will not be a correct picture of your trafic data.
Copy/paste the code below to a file named exclude.html:
You now need to change a value at line 14. Replace the text with the Google Analytics profile you need to exclude the visits on. This will be something line UA-XXXXXXX-XX. Now upload this exclude.html file to the root of your website: www.yoursite.com/exclude.html – you could place it anywhere, but you’ll need to access it quickly in the future, so don’t place it somewhere you don’t remember.
Now login to your Google Analytics account and navigate to the filters settings:
Admin -> [account name] -> Filters -> Click on New Filter and input the following:
It’s important that you type the “Filter Pattern” exactly as shown, as it relates to the code where we create a cookie with the value “test_value”. Before saving, remember to apply this filter to your profile.
Now you just need to visit the exclude.html file you’ve created. This will create a cookie on your computer. This cookie has a very long expiration date. Analytics will look for this cookie as we’ve created the filter, and will exclude the visits where this cookie is active.
Remember to visit exclude.html for each browser and computer you use, as the cookie will have to be set for all the browsers you use. But once you’ve done this, you don’t have to worry about your own site visits anymore.
You can now use this exclude.html file and copy/paste it to your other sites. Just remember to change the profile number and add the filter to the profile – easy!
If you have any questions or comments, go ahead and write those in the comments section below.