These tactics are best for excluding Admin and Testing visitors.
That means you, your co-workers, your clients, or anyone else you know, but don’t want in your results.
Most of My Suggestions Use Google Analytics Filters
Filters are used on a hit basis. That means every pageview or event on your site will run through your active filters before being added to Google Analytics reports.
To see what Google has to say about Profile Filters check out their support page.
I recommend creating multiple Profiles under your Property (website).
I always keep one profile with no filters. For my site I just have a Raw Data profile and an Exclude Admin profile.
Filtering out IP addresses is a great way to remove visitors that always access the site from one place.
I have provided a basic example to the right. If you are at an office that uses a range of IP addresses, use this great IP address range tool that Google has provided. This way you can exclude a range of IPs with just one filter.
Filtering IPs for desktop computers is great. Those IPs rarely change.
Laptops on the other hand change every time you connect to a new network. If you work in coffee shops like me this filter will never be a great solution to excluding yourself from Google Analytics reports.
Exclude Internet Service Provider (ISP)
If your company or a client has their own Internet Service Provider this is a very easy way to exclude that traffic. Large companies almost always have their own ISP. As an example, see the image to the right. All those institutions have their own ISP.
Downfall: Internal Applications and Huge Corporations
If you exclude a whole ISP you might miss out on data you didn’t mean to exclude.
For example, you build a website for management at a corporation to communicate to their sales team. Traffic from management needs to be excluded from Google Analytics reports so you exclude the corporate ISP. You would also miss out on most visits from the sales team since they share the same corporate ISP.
Custom Tagged Campaign Links
This is my favorite way to exclude visitors from Google Analytics reports. It’s simple, non-technical and works for anyone, anywhere, anytime.
This filter excludes traffic that enters your site from a tagged campaign URL link. I wrote about Custom Campaigns a while back if you want to learn more about them.
Here’s What You Do:
- Setup a new filter that matches the one to the right.
Don’t skip this step or the rest are pointless.
- Use this URL Builder provided by Google to create a tagged link.
- Enter your homepage or any sub-directory in the URL field.
- Enter these values:
- Campaign Source: Testing
- Campaign Medium: Link
- Campaign Name: HideMe
The link should look like this: www.dirtyanalytics.com/?utm_source=Testing&utm_medium=Link&utm_campaign=HideMe
- Use that link every time you want a site visit blocked from analytics
You can send this link to co-workers or clients. The great thing about it is they don’t have to understand how it works. Just make they use the special link every time they access the website.
I recommend adding a bookmark to your browser and using that every time you visit the site.
Downfall: You have to click on the tagged link.
Every time you visit the site you must use the tagged link to be excluded. This get’s old fast.
This method is best as a bookmark on your browser.
Universal Analytics Custom Dimensions
This only works if you are using the Universal Analytics tracking method.
This is the most difficult method, but is very effective.
It works by adding a cookie to your browser that will last for up to 2 years if you don’t delete your cookies. All you have to do to set that cookie is click a link on a hidden page. The link sets the cookie and redirects you to any page you choose.
- Follow these instructions from Google to create a Custom Dimension.
Make the custom dimension User level. Name it something like “Hide Me Tagged Visitors“.
- Write down the Index of the dimension. You need it later.
- Add the filter shown to the right to the Profile you need to exclude these visitors from.
- Create a page on your site that is not accessible through any menus.
- Add the following code to that page. It will just show the words “Click to Set Cookie” when you view it in a browser.
<a onclick="ga('set', 'dimensionX', 'HideMe');" href="URL">Click to Set Cookie</a>
Replace X with the Dimension Index # you wrote down earlier. Replace URL with the homepage URL.
- Once this link is clicked the browser you are using is tagged until its cookies are deleted.
- Repeat this anytime you switch browsers or delete your cookies to stay hidden.
Downfall: This Only Works in Universal Analytics
Pretty much self-explanatory. This doesn’t work with the classic Google Analytics tracking method.
Other than that it’s pretty awesome. All you need to do is click a link and your browser is tagged for up to 2 years.
Google Analytics Opt-Out
If you don’t want to worry about setting up any filters this is the option for you.
Google provides a browser add-on that will disable Google Analytics tracking on that browser. This disables Google Analytics on all websites. You can download it here.
You can also find some unofficial plugins that will let you choose which website to block like this one for Chrome.
Downfall: No Testing
This method blocks Google Analytics. You can’t set up a “Raw Data” profile that will show your activity. According to Google Analytics, you have no activity. This raw data is really helpful in testing your tracking and you lose that option if you block Analytics tracking.
Also – I also don’t mind sending my data to Google Analytics. It’s anonymous and it helps site owners make their sites better. If I don’t send them data that hinders their testing efforts as well.
Please leave a comment if you have any issues implementing these. I want to cover everything.
Also let me know which tactics are your favorite, especially if they are not listed in this post – I’d love to hear.