What it is
Hostname prepend places the host name (e.g. yoursite.com) in front of the page name (e.g. /about) when making a URI request (i.e. requesting a page from a website) so that it is captured in the analytics.
Why it matters
This filter is especially important if you are implementing a cross-domain tracking system. First it would add the hostname to the beginning of the Request URI for every pageview hit, and then it overwrites the Request URI with this new format.
After applying this filter, if you navigate to your Cross-Domain View in All Pages report, you will have all pages with their corresponding hostnames.
Let’s say you are tracking traffic on two different domains and the same user, Joe, visits both:
- yoursiteUSA.com
- yoursiteGLOBAL.com
And let’s say pages on these sites have the same name:
- yoursiteUSA.com/about
- yoursiteGLOBAL.com/about
If you DON’T prepend the hostname, your analytics will capture:
- 2 visits to “/about”
If you DO prepend the hostname, your analytics will capture:
- 1 visit to yoursiteUSA.com/about
- 1 visit to yoursiteGLOBAL.com/about
What to do
- Implement a filter that prepends hostname to page