CM
ClickMinded SOPKnowledge Base
Search
← All topics

Verifying that you’re tracking subdomains correctly in Google Analytics

SOP 033: Verifying that you’re tracking subdomains correctly in Google Analytics Audit, and fix the most common issues that affect websites doing subdomain tracking and make sure your Google Analytics

source:clickmindedtype:sopserver:clickminded-sopverifyingthatyouretracking
Agent trigger phrases: verifying that you re tracking subdomains correctly in google analytics · how to verifying that you re tracking subdomains correctly in google analytics

SOP 033: Verifying that you’re tracking subdomains correctly in Google Analytics

Audit, and fix the most common issues that affect websites doing subdomain tracking and make sure your Google Analytics setup is correctly configured.

Last Updated / Reviewed: 03/25/2024

Execution Time: 10-20 minutes

🚀 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.

🤔 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 this is 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.

__⚠️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.

Click here to get the most up-to-date version of this SOP

Before you start

Google Analytics 4 handles subdomains automatically if GA4 is installed on all those subdomains. GA4 supports a tracking parameter called cookie_domain which is set to auto by default. This means that GA cookies will remain the same across all subdomains of the same domain.

To track user behaviours and sessions across your subdomains, make sure you have installed the same GA4 property (with the same measurement ID) on all subdomains following SOP 009: Add Google Analytics To A Site (web version)

Check if user sessions are tracking properly in Google Analytics 4

01▸ Open your main website's home page using the Google Chrome browser. Right-click your mouse and select “Inspect.”

02▸ The developer toolbar will show. Select “Application” and select your domain under “Cookies”.

03▸ Search for “_ga” and you should be able to see the Cookies that were added to your website. Take note of this Cookie Value for your main domain.

04▸ Now repeat steps 2-3 for your subdomain, the Cookie value for your subdomain should be the same as your main domain, provided that you’ve implemented the same Google Analytics Property for both websites.

05▸ Now head over to your Google Analytics 4 dashboard . Head to Admin -> Debug view

06▸ The Debug should be empty since no developer device has logged in yet.

07▸ Head to  Google’s Tag Assistant  and add your domain. Make sure you are logged into the same Google Account as your Google Analytics.

08▸ Add your main website URL and click “Connect”

09▸ A new window will open will your main website loaded. Scroll around and click a few links on your main website and subdomains.

10▸ Then head back to Google Analytics’s Debug view. Google Analytics 4 should start tracking sessions for your website.

11▸ Repeat steps 7-10 for your subdomain(s), and you should be able to view the tracked sessions across your websites.