How to Display the hostname in Google Analytics?

If you are using google analytics to track the users behavior on your site, you would notice that the content pagess report does not display the URL with hostname (does not show the entire URL of the page) rather it displays the page URL without the hostname.

I know, you might be wondering how this will affect your reporting. What if you have multiple subdomains  like (makemarketer.com and agency.makemarketer.com) and users are navigating across multiple subdomains within the same root domain then google analytics will not record this activity and you might get confused on which subdomain this content report about pages relates to.

Example:

User visits www.makemarketer.com and analytics reports as ‘/’

Now the user navigates to agency.makemarketer.com and even then it is reported as ‘/’

The question is how do I classify that ‘/’ reported by Google is for which URL i.e. makemarketer.com or agency.makemarketer.com, since users visiting both of them are reported as ‘/’.

This is a very big problem if you are working on websites that have multiple subdomains on the same root domain. All the more, bigger issues arise here, when user moves from root domain to subdomain then GA will record a new session and increment the new user count. This happenseven if you have the same Google Analytics Tracking Code on the subdomains.

Ideally, it has to be attributed to the same session and all the hits to the same user and not new user. For this to be answered, you have to understand to tracking between two subdomains. You can learn about all these advanced eCommerce concepts in our Digital Marketing Bootcamp. This is India’s First 100% Real-Time Digital Marketing Bootcamp.

To fix this issue, you have to set up a filter at the view level. But be extra careful when you are applying a filter since this will modify the data. It is always recommended to apply this filter when setting up the analytics account. Filters are not retoractive, they modify the data from the day it has been implemented. Removing the filters will not get the unfiltered data anymore.

  1. To Apply this filter:
  2. Go to Admin section
  3. Select the view for which you want to apply the filter.
  4. Navigate to the Filters tab.
  5. Create a new filter
  6. Select the filter type as custom
  7. Select the advanced option
  8. Give values in Field A, Field B and Output like in the image below
Filter to Display Hostname in GA

Save your filter and you are done.

Now Google Analytics will record the entire URL in the content report including the hostname.  It will now become very easy to understand the users navigation path to check how the users are moving across subdomains to understand the users flow.

Learn Advanced Google Analytics in our Digital Marketing Bootcamp. Most of the experienced marketers really don’t understand the bounce rate and exit rate. They don’t know the basics of web analytics.

To become an effective marketer, measurement is the key. In fact measurement is the heart of all marketing strategies. Learn the most advanced measurement plans using Google Analytics and Google Tag Manager.

Google Tag Manager Bootcamp Course

Google Tag Manager (GTM) is now something that every digital marketer should know at a very deeper level. What GTM brings to marketing and measurement is uncomparable.