How to stop pirate sites affecting your Analytics
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.
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.
Nice and simple. I will do that right now. They should have set it up like that per default tho id say ….
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.
Interesting – never heard of someone doing a View Source, copy on an Analytics counter (mind you some people are just plain dumb anyways), but good to know Google is ahead of the game with this filter method. Thanks for sharing!
Always in the game with a nice design. the image here is gone though. Do you mind updating this info please b’cause it a nice thing to know for any concerned web site designer.
You might wanna review this comment area also, the name input is been hidden by the menu
I hadn’t thought of that one I’ll admit. It’s a few years since I’ve seen an entirely copied site mind you, although I know it does happen. The site that was copied was doing very well in Google rankings and I think someone thought that by copying the code it might rank the same. It didn’t though, not surprisingly.