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?


2 Answers 2


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.

  • How exactly can this be done?
    – p.campbell
    Apr 26, 2012 at 15:41
  • 3
    Admin > Filters > Add Filters > Create a new filter "excluding traffic from the domains:"
    – Chords
    Apr 26, 2012 at 15:51
  • Does this mean that you have to always click on the filters if you want to see the true reports ?
    – sam
    Oct 8, 2013 at 15:38
  • 1
    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, 2013 at 16:01

Another commenter mentioned using filters to INCLUDE only your own hostname. I've done this myself and it works great and kills a lot of spam referrals to boot.

One thing to be wary of is that you don't set this on the "all website data" view. Create a new view and name it accordingly to preserve the raw data for the whole site.

  • In order to ping someone with @username, it has to be a comment (which answers shouldn't contain), but I caught the edit anyway. Sorry, but we generally don't permit links to third-party sites from new users unless they're to a well-known source - otherwise we'd be inundated with spam and attempts at self-promotion (they usually result in quick downvotes too).
    – dan
    Dec 2, 2015 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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