Google Analytics Subdomain Tracking // How to configure subdomain tracking for your website

Google Analytics Subdomain Tracking // How to configure subdomain tracking for your website

Learn all about Google Analytics subdomain tracking. You will learn how to set the ‘cookie domain’ in Google Tag Manager, how Google Analytics works by default, and considerations if you’re not using Google Tag Manager. Together we will walk-through and see how Google Analytics sets cookies on your top-level and subdomains.

My email updates:
My courses:
My book:

○ Modifying the gtag.js tracking code –
○ Modifying the analytics.js tracking code –
○ Modifying the ga.js tracking code –

○ Cross-domain tracking –
○ Getting started with Google Tag Manager –

If people can travel between subdomains on your website, then it’s critical to understand how Google Analytics tracks and reports on these user actions. Google Analytics will automatically track subdomains once you’ve added the Google Analytics tracking code, but what if you want to control how this works? You can use Google Tag Manager to control the ‘cookie domain’ for Google Analytics, or you can modify your Google Analytics tracking code. This lets you control how cookies are set on your top-domain and subdomains.

○ My blog –
○ Contact me –

○ Camera –
○ Lens –
○ Microphone –
○ Microphone (for walk-through) –
○ Lights –

○ Email platform –
○ Course platform –
○ Data connector –

#GoogleAnalyticsSubdomain #GoogleAnalytics #SubdomainTracking

Subscribe for more videos: />
DISCLAIMER: This description might include affiliate links. If you purchase a product or service with the links provided we may receive a small commission. Thank you for supporting Loves Data!

10 thoughts on “Google Analytics Subdomain Tracking // How to configure subdomain tracking for your website”

  1. Hi Benjamin. Thanks for the video. I would like to ask you one question, I hope you can help me. I have created two properties in GA to track my main domain and subdomain. Should I also have two different containers in GTM or just one to track these two properties? Regards.

  2. Very helpful video, Thanks for sharing your knowledge!
    QUESTION: If using Google Tag Manager and the subdomain is being tracked through a separate UA property, what UA code is installed on the subdomain, that of the primary domain, or that of the separate subdomain property? I've installed the Subdomain UA code on the subdomain and I'm getting no data into analytics. Thanks again

  3. I'm really confused. Can someone please clear my doubt.

    Did you add the same GTM tracking code to the subdomains or is it automatically tracked with the tracking code on the root website?

    Do we need to create different containers for subdomains if we have to add the Gtm tracking on a subdomain.

    Do we have to set "cookiedomain" set to "auto" for all the containers of subdomains?

    Thanks in advance!

Leave a Comment

Your email address will not be published.