How to track traffic from my domain only – Google Analytics

It sometimes happens that someone would use your tracking code on their domain. Even loaded not on your original domain this will affect your statistics.

The easiest way to prevent that is by creating a filter. Go to your analytics account admin section -> Profile -> Filters and create a filter:

Once you create a filter like that for your own domain Google Analytics will include traffic for that domain only. It is a good practice to keep one unfiltered profile, just in case something goes wrong when setting up the filter.

Any past data cannot be changed. But you could use an advanced segment and filter on the hostname (which should match your domain) then you should see only the data from your domain.

Note that filters do not affect Real time tracking. It shows all related data of the past 30mins.