How to fix redundant hostnames in Google Analytics
It is possible in Google Analytics to show or hide domains and subdomains by using filters for a specific view, in Admin > View > Filters > Add filter.
Adding or removing a filter will however not change existing data, but will be applied on the future visits that will happen on the site.
Google Analytics tutorial filters
On the page view report, in below example, the subdomains and domain are not shown. But the traffic is coming from several domains : https://www.wcifly.com, https://wcifly.com, and https://travel.wcifly.com.
This distinction is actually not visible on the page view report, and a filter must be added.
Google Analytics filters
First of all, it is necessary to find the view on which the filter will be applied and the subdomain will be added or removed.
Go to the admin panel, accessible in the bottom left of the sign, the gear icon Admin, and navigate to the view corresponding to the Analytics account and property to update. There, select the filters option.
Once in the filters menu, the different filters, if any, will be displayed in a table.
It is possible to add new filters in order to display or manage the subdomains, and append or prepend them to the Analytics results, and to delete the filters to hide the subdomains.
Google Analytics hostname append
In the new filter form, there are plenty of options, which can be useful for big websites, or when managing several domain names, subdomains, and websites on the exact same view.
For example, to prepend hostname, select an advanced filter, and put the wildcards (.*) to both field A and field B, meaning to both the domain and the page.
Show full URL Google Analytics
Then, put both field A and field B as output, which will that way show a full URL, and not mix pages which have the same path on different subdomains together.
Do not forget to check that the field A is setup as required, and to override the output field.
Redundant hostnames Google Analytics
After a while, the hostnames should be visible on the Google Analytics pages report.
The URL will be shown in full, and two pages with similar name but on different subdomains will not be mixed together anymore.How to Quickly (and Correctly) Track Google Analytics Across Multiple Domains
Google Analytics sign in