Set Up a Hub-Specific View in Google Analytics

Follow

Objective

If you use the same Google Analytics Tracking ID for multiple web properties (e.g. your main website and your Hub), you can use a view with a filter to separate out the data that is specific to your Hub.

In this article, you'll learn how to set up a Google Analytics view that filters out all metrics that do not relate to your Hub for both subdomain and subdirectory Hubs.

What about segments?

You might have thought about creating a segment to divide your Hub-related metrics from your main website metrics. However, with segments, you may still see data that's not strictly related to your Hub.

Because Google Analytics segments are session based, they can display data that does not strictly fit the segment's filter criteria if it's part of a session that does include qualifying data. For example, if a visitor goes to your Hub and your main website in a single session, page views from both would be recorded in that session, and therefore included in the segment.

As a result, segments aren't well suited for the purpose of separating your Hub and main website data, and we recommend using a dedicated view with a filter instead.

 

Create a Hub-Only Filtered View in Google Analytics

  1. Log in to your Google Analytics account. You will need Admin rights to the Google Analytics account.
  2. In Google Analytics, create a new view.
    • See this article from Google for instructions on how to create a new view.
    • Make sure that you do NOT use an existing view — create a new view specifically for this purpose to avoid affecting the data in your existing views.
  3. Within the view you just created, add a new filter at the view level.
  4. When you are on the filter creation view, choose Predefined for the Filter Type.
  5. If you have a subdomain custom domain like https://hub.mywebsite.com/, set up the filter as follows:
    • Select Include only > traffic to the hostname > that are equal to
    • In the Hostname field, type in your Hub's full domain, e.g. hub.mywebsite.com
      Analytics.png
  6. If you have a subdirectory custom domain like https://www.mywebsite.com/hub/, set up the filter as follows:
    • Select Include only > traffic to the subdirectories > that begin with
    • In the Subdirectory field, type in your Hub's subdirectory e.g. /hub/ if your Hub lives at www.mywebsite.com/hub/
    • Leave the Case Sensitive field unchecked
      Analytics.png
  7. Click on Save to save the filter to your new view. You will now be able to select this filtered view from the top menu bar of Google Analytics to view only Hub-related metrics. 
0 out of 0 found this helpful