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 it matters
Having a faulty set up might make you lose important information about your visitors and skew your data affecting your business decisions
Before you start
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 LLM Decode 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
Key steps
11 steps
What is inside
13 headings
1Before you start
2Check if user sessions are tracking properly in Google Analytics 411
Open your main website's home page using the Google Chrome browser. Right-click your mouse and select “Inspect.”
The developer toolbar will show. Select “Application” and select your domain under “Cookies”.
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.
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.
Now head over to your Google Analytics 4 dashboard . Head to Admin -> Debug view
The Debug should be empty since no developer device has logged in yet.
Head to Google’s Tag Assistant and add your domain. Make sure you are logged into the same Google Account as your Google Analytics.
Add your main website URL and click “Connect”
A new window will open will your main website loaded. Scroll around and click a few links on your main website and subdomains.
Then head back to Google Analytics’s Debug view. Google Analytics 4 should start tracking sessions for your website.
Repeat steps 7-10 for your subdomain(s), and you should be able to view the tracked sessions across your websites.