Skip to content
English
  • There are no suggestions because the search field is empty.

Ho to Verify that you’re tracking subdomains correctly in Google Analytics

Goal
To make sure your Google Analytics setup is correctly configured to track your subdomains.
Ideal Outcome
You are tracking your users and sessions correctly across your subdomains.
Prerequisites or requirements

You must have Google Analytics running on your website. If you haven’t done it yet you can follow SOP 009 (web version).

The specific steps on this SOP apply only to Universal Google Analytics (not Google Analytics 4). If you followed other ClickMinded SOPs to create your Google Analytics account or if you set up Google Analytics before October 2020 you most likely have a Universal Analytics property.

Why this is important
Having a faulty set up might make you lose important information about your visitors and skew your data affecting your business decisions.
Where this is done
In Google Analytics and Google Tag Manager.
When is this done
Only once. When setting up Google Analytics or when performing a check to make sure your current setup is working properly.
Who does this
The person responsible for website management, or analytics.

SOP Update: Google Analytics 4

💡 Note: Google has released a new version of Google Analytics in October 2020, this new version can be set as a property alongside its standard version “Universal Analytics”.

The “Universal Analytics” properties will likely be supported by Google for years to come. Currently, all ClickMinded SOPs support Universal Analytics exclusively.

To make sure you can follow this step-by-step SOP make sure you have selected the Universal Analytics property at all times:

  1. On the top left corner click on the Account Dropdown and select a view within your Universal Analytics property (Not the GA4 property):

💡 Note: You can identify your Universal Analytics property by noticing the ‘UA-’ prefix in the Property ID below its name:

Checking your cookieDomain configuration

  1. Go to GA Checker → Enter your domain and subdomains and make sure “Universal Analytics” is ticked in most pages.

    1. Note: GA Checker might not find all your subdomains even if you use the “Include Subdomains” toggle. Ideally you should input each of them manually.

    2. Note 2: Some pages might not have the green tick if those pages are not meant to be tracked or are not html pages.

  2. If you’re still using Classic Google Analytics you might want to consider migrating to Universal Analytics. (outside of the scope of this SOP)

  3. Check if your Google Analytics setup is using Google Tag Manager.

    1. If your Google Analytics setup is not using Google Tag Manager your cookieDomain configurations should be great and there should be no need to make any changes.

  4. Check If your Google Analytics setup in Google Tag Manager is using the built-in Universal Analytics Tag and if you’re using the Google Analytics settings variable:

    1. Go to http://tagmanager.google.com and sign in with your account details.

    2. Select the container that is set up on your website.

    1. Go to “Tags”:

    1. Search “Universal Analytics”:

      1. If there are no tags found you are not using the built-in Universal Analytics Tag, your cookieDomain configurations should be ok and there should be no need to make any changes.

      1. If you find one or more tags make sure one of them is set to track Pageviews, usually this tag will be set to trigger on “All Pages”. Click on the Tag → Confirm that you are using the “Google Analytics Settings” field:

        1. If you see the message “Select Settings Variable…” and the “Enable overriding settings in this tag” option is ticked, it means you are not. If that is the case it is recommended to start using a Google Analytics settings variable (you can follow the procedure covered in SOP 009 . If, for some reason, you don’t want to use the variable:

          1. Click “More Settings” → “Fields to Set”

          2. If there is nothing there, click “+Add Field” and add the following entry:

            1. Field Name: “cookieDomain”

            2. Value: “auto”

            1. Click “Save” to save your tag

            1. That’s it you’re now ready to “Submit” and “Publish” your tag and your cookieDomain settings are now fixed.

        1. If you see a Google Tag Manager variable in that field (it will start and end with two curly brackets) you can simply check if your variable is properly set up:

          1. Click Variables → Click your variable (The variable type is “Google Analytics settings”)

          1. Make sure cookie domain is “auto”:

Checking if your root domain is added to your Referral Exclusion List

Note: It is very likely that your root domain is already added to your Referral Exclusion List, but still worth checking since it might have been changed or removed.

  1. Open your Google Analytics account settings by clicking here or clicking “Admin” in the sidebar.

  2. Select the correct Google Analytics Account and Property

 

  1. Click “Tracking Info” → “Referral Exclusion List”

  1. Make sure your root domain is on the list:

    1. If you don’t see your root domain on the list:

      1. Click “+Add Referral Exclusion”

      2. Type your root domain

      3. Click “Create”

Adding a Hostname filter to include your subdomain data

Note: This is an optional step and depending on your current Google Analytics setup it might impact other configurations such as custom reports and goals.

  1. Log In to your Google Analytics account .

  2. Check If you already have a filter implemented, you can do so under filters, or by heading over to Behaviour → Site Content → All pages.

  3. If you have the standard set up you will see the page path in the reports:

    1. Note: By default Google Analytics will aggregate data from all the subdomains, so you should bear in mind that in fact the page “/” is not only your main domain’s homepage but also the homepage of all your subdomains being tracked by the same property if their homepages are also in the root of the subdomain.

  1. If you want to display the subdomain information on your reports straight away, you can follow SOP 035 - Displaying subdomains in your Google Analytics Reports .

  2. That’s it. By the end of the SOP you will be seeing the subdomain information straight on your reports: