23/06/09How to prevent unauthorised domains affecting your Google Analytics reports

We recently discovered that not only had someone copied our entire site design and code, they hadn’t even bothered to change the tracking code, so their hits were being counted in our Google Analytics account, which was making a mess of our reports.

The workaround was fairly simple, all we had to do is add a custom ‘include’ filter on the profile settings page within Analytics.

GA-Filter

The code you need

Simply add a ‘Custom filter’ with the following settings:

Filter Type include
Filter Field hostname
Filter Pattern yourdomain\.com
Case Sensitive no

Don’t forget to escape the dots in your domain name with a backslash, as this string will be parsed as a Regular Expression by Google, and an un-escaped . character will match any character.

Author:

Chris Wheeler

Date:

June 23rd, 2009 at 11:01 am

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

2 responses to “How to prevent unauthorised domains affecting your Google Analytics reports”

  1. Nice and simple. I will do that right now. They should have set it up like that per default tho id say ….

  2. Ya know, that is the new thing for web design these days:
    view source > copy > paste > edit logo. done.
    Thanks for the tip. I’ve had this done to me far too many times.

Leave a reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Get in touch today and find out how we can help you.

Phone
01243 532217

Email

Address
12 Northgate, Chichester
West Sussex, UK
PO19 1BA

Company Number
6397150

VAT Registration Number
922 5771 20

vCard
Download our vCard

Map & Directions
Google map

Quick Enquiry Form

Status

Status

Status

  • What are good showcase sites these days? All of our old favourites seemed to have died #css #design
Flickr last.fm