As a Goolge Analytics Consultant, McBuzz helps clients learn about traffic on their website so they can improve visitors’ experience and generate more leads and sales. If you have a website, you should be using Google Analytics to track visitors on your site. But you don’t need to track your own visits to the site, nor do you want to track visits made by other people in your company, or by your clients if you are a webmaster or online marketing consultant.
EXCLUDING INTERNAL TRAFFIC FROM GOOGLE ANALYTICS REPORTS
All these visits are called “internal traffic”: visits made by you or by people who work for the company that owns the website. Data from these visits will skew the results that you really want to see. You want to track visits made by customers and potential customers.
There are a number of ways to exclude internal traffic from Google Analytics reports. Continued…You can exclude visitors based on the IP address of their computer/internet connection. And you can exclude a range of IP addresses so that you can keep visits for a large office of many users out of Analytics reports. This is appropriate if there are many people in an office who all access the company website to do certain tasks.
There are situations where excluding internal traffic using an IP address may not be ideal. If you or people in your office work remotely, then they need to exclude IP addresses at home as well as at work. If you are like me and you work from many different locations, then trying to exclude IP addresses every time you sit down in a coffee shop somewhere can be tedious and time-consuming.
There’s an easier solution: excluding internal traffic using a cookie. When you exclude traffic with a cookie, you can filter out of Analytics reports all the visits you make to a given domain.
HOW TO EXCLUDE INTERNAL TRAFFIC FROM GOOGLE ANALYTICS REPORTS USING A COOKIE
- Create a simple web page
- Use the following in the HTML file for the page:
var _gaq = _gaq || ;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script'); s.parentNode.insertBefore(ga, s);
<meta name="robots" content="noindex">
<h1>Google Analytics cookie has been created!</h1>
- Replace UA-xxxxxxx-x with your Google Analytics account ID
- Save the file with whatever name you want. I use the domain name plus “no-report”, for example: yourdomain-no-report.html
- Upload the file to the “root” directory of the website, so you can get to the page by going to http://yourdomain.com/yourdomain-no-report.html
- Note that this HTML page and the cookie it creates use the asynchronous Google Analytics script. If you are using the old version of the script or you are not sure what you are using, contact me.
- Here is the Google Analytics Asynchronous Code Usage Guide.
HOW TO CREATE A FILTER IN GOOGLE ANALYTICS TO EXCLUDE INTERNAL VISITS
Next, create a custom “Exclude” filter in Google Analytics using the Filter Manager.
- Login to Google Analytics
- Click on the website name in the main dashboard
- Now you will see the dashboard for that particular site
- Click on the Google Analytics Filter Manager (shown here)
- Add a new exclude filter with these settings (shown here) – To see this image at full size, click here. Then right-click on the image and select “View Image”.Filter Settings
Filter Type: Custom filter > Exclude
Filter Field: User-Defined
Filter Pattern: no_report
- Be sure to select the name of the website under “Available Website Profiles” and click the Add button to add it to the “Selected Website Profiles”
- Click Save Changes
“SET” THE COOKIE IN ANY BROWSER YOU USE TO VIEW THE WEBSITE
Finally, after you have uploaded your HTML file, you need to go to the address where you can view that page with your web browser. For example: http://yourdomain.com/yourdomain-no-report.html
Once you see that page, you are done. Just close your browser window or go to any other web page.
You need to be sure to visit that page with every browser you use to view or work on your site. And everyone one at your company should do the same. So if you use one computer at home and another at work, you need to go to that cookie page with each machine. If you use more than one web browser, you need to go to that page with all of them. If you clear out (delete) your cookies, you’ll need to visit the page again after doing so.
Tracking Visits to the Exclude Filter Page
By including the Google Analytics tracking snippet on the cookie filter page (like this filter page does), you can see who visits the page. This is valuable info if you are a marketing consultant, because you can see if your client has visited the page like you asked them to! And if you have asked more than one person to do so, you know who has and who has not. Note in the real example below that, so far, only one person has visited the page (on two different browsers).