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

We have a frustrating problem where someone copied our site code including our Google Analytics code. So we are getting stats logged from their site which is very frustrating.

I have setup 4 Filters, each trying to disallow any traffic from this other website, but still their traffic is being shown, including on the Real Time section.

Do Filters even work to exclude traffic? Here is how I have it setup:

enter image description here enter image description here

Neither of these seem to help at all.

share|improve this question
    
could you check in your profile settings whether the multiple TLDs switch in GA is left On? –  Prasad Feb 6 '13 at 4:36
    
Where is that setting at? –  Nic Hubbard Feb 6 '13 at 23:30
    
In Admin, select your property, then switch to the Tracking Info tab. There you would find this setting. –  Prasad Feb 7 '13 at 13:36
add comment

1 Answer

For our sites we usually take the opposite approach and instead of excluding traffic to hosts we define an include filter with the hostname we want to collect statistics for.

To do this we use a Custom Include Filter against the Hostname field and with a filter pattern of hostname.tld.

Here is a screen capture showing the appropriate settings which work for us:

defining google analytics filter to include traffic from a hostname

On a related note, we also usually define a couple of other filters. One to force the URI to lowercase so that uris like /Page.html and /page.html just show up once in our reports and the other to exclude internal traffic from our offices based off IP addresses.

share|improve this answer
add comment

Your Answer

 
discard

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.