Filter to show complete URL (including subdomain) in Google Analytics reports

7,879

Solution 1

First of all, you should have BP (Best Practise) views:

  1. one for your master reports,
  2. one for testing out filters and configurations and goals, and
  3. one raw where there are no filters applied.

Second, to create a filter where you can see your hostname, you just need to create an advanced filter where you append the hostname to your request URI. This link tells you how to create that filter: https://support.google.com/analytics/answer/1012243?hl=en

You should always create filters and test them out in your Test view before applying them to your master view.

Solution 2

Google Analytics doesn't store the full qualified URL, including the domain, unless you tell it to. See @nyuen answer for how to do that.

But maybe you already have a lot of historical tracking data that you want to make sense of. In this case, you can use the Page Title as a Secondary Dimension the content reports. This will break down pages with identical URLs if they have a different title.

How it looks in a custom GA report

Share:
7,879

Related videos on Youtube

Ajit KS
Author by

Ajit KS

Updated on September 18, 2022

Comments

  • Ajit KS
    Ajit KS over 1 year

    I have a subdomain on my website and am unable to get some data individually for the main domain and subdomain. For example, both the homepages are counted as one with the "/".

    I have seen some suggestions of creating a filter to show the complete URL. At the same time, there were users cautioning me about creating a filter as doing it wrong may mess up all my Analytics data. Can somebody point me in the right direction. What should I do?

  • Ajit KS
    Ajit KS about 8 years
    Thanks. So, I have setup a Test view and have created a filter using the GA link you provided above. There is a small problem though. I am not seeing visits tracked on example.com and sub.example.com. But, example.com/page and sub.example.com/page are being tracked.
  • nyuen
    nyuen about 8 years
    Not sure what you mean. Can you elaborate?
  • Ajit KS
    Ajit KS about 8 years
    As advised by you, I created an advanced filter to append the hostname to the request URI. It is now showing the complete hostname in the Real-time tracking. There is a problem though. Visits to my homepage on pickyourtrail.com are not getting tracked in real-time reporting. But, when he navigates to another page like pickyourtrail.com/veho, it shows as traffic on that page alone in real-time reporting. Why is this happening? Thank you for your help!
  • nyuen
    nyuen about 8 years
    I'm not sure, you may have another issue there. The hostname filter should not be blocking visits. I went to your site and could see the pageview hit being sent. Can you install GA Debugger and verify? Check also there you don't have any other filters that may be doing something it shouldn't.
  • Ajit KS
    Ajit KS about 8 years
    I may have found the problem. will keep you posted.
  • Ajit KS
    Ajit KS about 8 years
    I had the wrong Property ID on that page. Am seeing the complete domain URL. Thank you so much!