Consent Mode v2 dropping tracking at checkout
When a cookie banner resets on a subdomain, you lose your tracking attribution. We explain how cookie domain scoping fixes cross-subdomain consent drops.
A consent banner reappears on your checkout subdomain because the consent cookie was saved to the exact address of the main website, rendering it completely invisible to the rest of the business. When the user navigates from the main site to the shop, the browser finds no record of their previous choice. Consent Mode defaults back to a denied state, and your analytics platform quietly drops the tracking signals.
We see this frequently when businesses use a third-party application for their quote engine, booking system, or checkout, hosted on a subdomain like shop.yourdomain.co.uk. The user accepts cookies on the homepage, browses the products, and clicks to buy. Suddenly, they are asked to accept cookies again.
We check the network requests in the browser to see what Google Tag Manager (GTM) is doing. When the user is forced to accept the banner twice, it creates a break in the data. GA4 sees one visitor browsing the products, and a completely different, anonymous visitor completing the purchase.
How cookie domain scoping breaks consent
When a visitor interacts with a Consent Management Platform (CMP) like Cookiebot or OneTrust, the platform saves their choice in a first-party cookie on their device.
By default, the browser is strictly territorial about where cookies can be read. If your main website is located at www.agentix.co.uk, the CMP might save the cookie specifically for the www subdomain.
When the user moves to the checkout.agentix.co.uk subdomain, the browser looks for a cookie belonging to that specific address. It cannot see the one saved on the www address. As far as the browser is concerned, this is a brand new visitor who has not yet made a consent choice.
| Visitor Location | Consent Cookie Scope | Browser Visibility | GTM Consent State |
|---|---|---|---|
www.example.co.uk | www.example.co.uk | Visible | Granted (G111) |
shop.example.co.uk | www.example.co.uk | Invisible | Denied (G100) |
shop.example.co.uk (Accepts again) | shop.example.co.uk | Visible | Granted (New Session) |
The immediate commercial consequence is broken attribution. The original session, which contained the Google Ads click or the organic search keyword that drove the visit, is walled off on the www subdomain. The new session on the shop subdomain contains the actual revenue. Because the two are not linked, your ad campaigns receive zero credit for the sales they generate.
The cost of fractured sessions
When you lose the connection between the marketing source and the commercial outcome, your reporting dashboards become worse than useless. They become actively misleading.
Consider a B2B wholesaler spending £4,000 a month on Google Ads, sending traffic to a main brochure site, with a trade portal located on a subdomain.
| Analytics Metric | Main Site (Pre-Hop) | Subdomain (Post-Hop) | The Commercial Gap |
|---|---|---|---|
| Traffic Source | Google Ads (Paid Search) | Direct (None) | Campaign attribution is lost. |
| Visitor Count | 1 Visitor | 1 New Visitor | Sessions are artificially doubled. |
| Recorded Conversions | 0 | £850 Order | Revenue is untethered from ad spend. |
| Calculated ROAS | £0.00 return | Unattributed revenue | Budget cuts on profitable campaigns. |
If you look at your Google Ads dashboard, the campaigns appear to be burning cash without generating a single quote or sale. The agency managing the account will likely turn off the best-performing keywords, simply because the consent configuration failed to carry the tracking ID across the subdomain gap.
Fixing the scope at the root domain
If you are undergoing a cookie consent audit, the fix requires changing how the CMP writes its data to the browser.
We check the configuration of the CMP script or the GTM Tag Template. Instead of allowing the platform to default to the exact hostname, we force it to write the cookie to the root domain.
In technical terms, we change the cookie domain from www.example.co.uk to .example.co.uk (note the leading dot). The leading dot tells the browser that this cookie is valid for the main domain and every possible subdomain attached to it.
Once the root domain is specified, the user accepts the banner on the homepage. When they cross over to the checkout subdomain, the browser recognises the root cookie. GTM reads the granted consent state instantly, the gcs network parameter stays at G111 (fully granted), and the visitor's journey remains unbroken from the first ad click to the final order confirmation.
Frequently asked questions
Does this fix tracking between completely different domains?
No. Scoping a cookie to .example.co.uk only works for subdomains attached to that exact root. If your main site is example.co.uk and your checkout is hosted on different-checkout.com, the browser will physically block the cookie sharing for security reasons. You must use URL Passthrough (cross-domain tracking via the _gl parameter) instead.
Why do some CMPs default to the exact subdomain?
Many CMPs default to strict exact-match scoping to prevent accidental data leakage across unrelated parts of a massive corporate network (e.g., stopping the HR portal from reading the marketing site's cookies). For a standard eCommerce or B2B site, this strict default actively harms the tracking.
Will this fix historical attribution data?
No. Changing the cookie domain scoping only fixes the tracking for future visitors. Any sessions that were already broken across the subdomains and recorded as 'Direct' traffic in GA4 will remain that way permanently in your historical reports.
Do I need to change anything in Google Tag Manager?
Usually, no. If you are using a certified CMP Tag Template in GTM, changing the setting inside the CMP dashboard (e.g., Cookiebot or OneTrust) is often enough, as the template will pull the new configuration automatically. However, custom HTML consent scripts will require manual code edits in GTM.
How do I check if my consent is dropping?
Open your browser's Developer Tools, go to the Network tab, and filter for collect?v=2 (the GA4 request). Navigate from your main site to your subdomain. Look at the gcs parameter in the payload. If it changes from G111 (granted) to G100 (denied) when the URL changes, your consent scoping is broken.