Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

After looking over our Analytics today, I realized that another website is also using our same tracking code #, which is cause quite a few incorrect hits to our Analytics.

Are there any ways to prevent this? Shouldn't Google only accept hits from the same domain?

share|improve this question

migrated from stackoverflow.com Apr 27 '12 at 5:19

This question came from our site for professional and enthusiast programmers.

Google binds tracking codes to specific domains, so it's unlikely that this is happening. Can you provide a bit more details, perhaps URLs to look at? –  NADH Apr 26 '12 at 15:38
I had a situation like this recently. Someone in a Japan copied my entire website (html/css/js), updated the text, and used it for their own website. Of course the google analytics code was the same. I don't think you can really do much apart from ask who ever it is to remove it, or change your code. –  Tim B James Apr 26 '12 at 15:39
Yes, someone copied our website code and made a new website here: marigas.com.pk/OurVision.html They are using our tracking code on almost all pages. –  Nic Hubbard Apr 26 '12 at 16:42

1 Answer 1

up vote 23 down vote accepted

You can exclude the hostname sending data to your profile by setting up an exclude filter.

Alternatively, it might be better if you set up just an include filter for your own hostname to ensure you don't see anything like that in the future.

Google Analytics Filters - you might want to set up a rule/filter to "Include only traffic from the domains equal to" YourDomain.net.

share|improve this answer
How exactly can this be done? –  p.campbell Apr 26 '12 at 15:41
Admin > Filters > Add Filters > Create a new filter "excluding traffic from the domains:" –  Chords Apr 26 '12 at 15:51
Thank you, this is super helpful! –  Nic Hubbard Apr 26 '12 at 16:45
Does this mean that you have to always click on the filters if you want to see the true reports ? –  sam Oct 8 '13 at 15:38
The filter applies to the profiles it's set on, so once you create the filter you can use any and all reports within that profile as you normally would. It's best practice to maintain a "Raw Data" profile that has no filters on it, in case you ever need to reference some data that you omitted, either intentionally or otherwise. It's also beneficial to add annotations to your reports of when you make changes like that - easy to forget when you're looking back. –  Chords Oct 8 '13 at 16:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.