By default, Google Analytics does not differentiate reporting for subdomains. So, if your website uses subdomains, such as for another language (spanish.yourdomain.com), you will need to set up filters in your Analytics account to track traffic to those subdomains accurately.
To set up a filter to enable the full domain to display when viewing reports, follow these steps:
- Log in to your Analytics account and go to the Admin screen.
- Click on “Filters” under the third column (VIEW).
- Click “+ New Filter”
- Add Name for Filter (anything is ok – example – “Show Full Subdomain”).
- Select “Custom” for Filter Type.
- Selected “Advanced”.
- For Field A -> Extract A, select “Hostname” from the drop-down and type the following into the field: (.*).
- For Field B -> Extract B, select Request URl and type the following into the field: (.*).
- For Output To -> Constructor, select Request URl and type the following into the field: $A1$B1.
- Leave the rest of the settings as is and click “Save.”
Now, you will see full URLs in Google Analytics. Data from now on will be attributed correctly.