Google Analytics: Hostname Prepends

by Brian Toomey, JB Analytics CEO

What it is

Hostname prepend places the host name (e.g. 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:


And let’s say pages on these sites have the same name:


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
  • 1 visit to
JB Analytics’ data-driven approach to search, web design, and testing drove a valuable increase in lead volume and quality. We recommend them to anyone in a technical B2B space.

What to do

  • Implement a filter that prepends hostname to page

Happier Users & More Traffic

We’re passionate about delivering value through design, data and development. Let’s talk!