When setting Google Analytics up, it’s important to do it the right way to protect the tracking and to prevent outside influences. One piece is to add a filter on the domain name so any Google Analytics code that is embedded in your website’s <head> area cannot be added to another website(s), thereby skewing the actual statistics.
In other words, you tell Google that,
“Any visitors from domain.com are the ONLY visitors to track even if other websites with the same code try to inflate those final numbers.”
To create a filter at the account level that protects the domain name:
- Sign in to Google Analytics.
- Click Admin, and navigate to the account in which you want to create the filter.
- In the ACCOUNT column, click All Filters.
- Click the + New Filter red button.
- Enter a name for the filter: “Only domain.com traffic”
- Select Custom filter, select Include, select Hostname, then add domain\.com (*NOTE: the correct slash direction is crucial)
- Select the Available View and move it to Selected Views in the right box
- Click Save.
*If you use the incorrect / forward slash, visitors will not be recorded. You MUST use the \ backward slash.
Here is our filter on our market2all.com domain name:
. . . .
Let us know if you need help setting Google Analytics up correctly.