Sub topic 3
Basic versus advanced Consent Mode
This chapter assumes you know what the Consent Mode v2 signals are (ad_storage, ad_user_data, ad_personalization, analytics_storage). It also assumes you have used gtag.js or Google Tag Manager and know that a consent management platform (CMP) is the banner software that records the visitor's choice. Here you will learn the one decision that determines how much data GA4 can receive from visitors who say no.
The one difference that matters
Both modes use the same signals and the same default and update commands. They differ in one thing: whether Google tags load and send anything before the visitor has chosen.
- Basic mode blocks Google tags from loading until the visitor interacts with the banner. A visitor who denies consent sends nothing to Google.
- Advanced mode loads Google tags on page load with the consent state set to denied. While consent is denied, the tags send cookieless pings. The pings carry the consent state and limited technical information, but not persistent identifiers.
Everything else in this chapter follows from that difference.
How basic mode behaves
In basic mode you do not load gtag.js or the Google Tag Manager container until the visitor accepts. You may still set a default consent state, because the state is useful once the tags load. A visitor who accepts triggers the tag load and an update. A visitor who rejects triggers nothing.
The consequences are:
- No hits, no cookies and no pings reach Google for visitors who reject or never answer the banner.
- GA4 reports contain only observed data from visitors who granted consent. You see nothing about the rest, so you cannot measure how many visitors you are missing.
- GA4 has no data from denied visitors to learn from, so it cannot apply behavioral modelling to your property. Google's documentation limits GA4 behavioral modelling to advanced mode.
- Google Ads conversion modelling still exists for basic mode. It relies on general consent-mode patterns rather than the behavior of your own denied visitors, so it is less specific to your site.
Here is a minimal basic-mode setup in JavaScript. The tag library is injected only after acceptance. Replace G-XXXXXXX with your measurement ID.
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// Defaults are set, but no Google script has been requested yet.
gtag('consent', 'default', {
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
analytics_storage: 'denied'
});
// Call this from your banner when the visitor accepts.
function onConsentAccepted() {
gtag('consent', 'update', {
ad_storage: 'granted',
ad_user_data: 'granted',
ad_personalization: 'granted',
analytics_storage: 'granted'
});
var s = document.createElement('script');
s.async = true;
s.src = 'https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX';
document.head.appendChild(s);
gtag('js', new Date());
gtag('config', 'G-XXXXXXX');
}In Google Tag Manager, the equivalent is to keep Google tags from firing until a trigger fires on your CMP's acceptance event. Do not rely on a default-denied state alone.
How advanced mode behaves
In advanced mode the tags load immediately, so the default command must run first. If it runs after the tag loads, the first hits go out with the wrong consent state. The wait_for_update parameter from the earlier example gives an asynchronous banner time to send an update before the first hit.
While analytics_storage is denied, GA4 does not write or read its first-party cookies. It sends pings instead. The pings include:
- the consent state of each signal
- the page URL and referrer
- a timestamp, user agent and similar technical context
- a flag for whether the page view looks like the start of a session
The pings do not include a persistent client ID, so GA4 cannot recognize a returning visitor. After the visitor accepts, the tags send normal hits with cookies, and the update applies to later hits only. Earlier pings are not rewritten.
The consequences are:
- Google receives some signal from every visitor, including those who reject.
- GA4 can use the pings as training input for behavioral modelling, if your property meets the eligibility conditions covered in a later chapter.
- You carry more compliance work. Your legal basis must cover sending cookieless pings before a choice is made. Check this with your privacy counsel and your CMP vendor. Google's mode names are not legal categories.
Here is the same setup in advanced mode. The tag loads straight away, and the update is called from the banner.
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// Runs before the Google tag loads.
gtag('consent', 'default', {
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
analytics_storage: 'denied',
wait_for_update: 500
});
// The tag loads right away. Pings are sent while consent is denied.
// <script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"></script>
gtag('js', new Date());
gtag('config', 'G-XXXXXXX');The <script> line is shown as a comment so the block is valid JavaScript. In a real page it sits in your HTML after the inline script that defines gtag.
Side-by-side comparison
| Aspect | Basic mode | Advanced mode |
|---|---|---|
| Google tags load before a choice | No | Yes, with a denied default |
| Data from visitors who reject | None | Cookieless pings only |
| Cookies while denied | None | None |
| Visible gap size in GA4 | Unknown, because denied visitors are absent | Measurable through ping-based counts and consent fields |
| GA4 behavioral modelling | Not available | Available if eligibility is met |
| Ads conversion modelling | Uses general patterns, not your site's data | Uses your own denied-consent pings |
| Implementation risk | Lower. Tags simply wait. | Higher. A late default or early tag causes wrong states. |
| Typical privacy posture | More conservative | Needs a legal review of pre-consent pings |
Choosing between them
Treat the choice as a trade-off between data completeness and legal and operational risk.
- Start from your legal position. If your counsel or regulator requires that no request leave the browser before consent, basic mode is the available option. Technical benefit does not override that.
- Estimate how much you lose. In markets with high rejection rates, basic mode can remove a large share of traffic from GA4. Advanced mode lets modelling recover part of it. It is an estimate, not a restoration, and it does not apply to every property.
- Count your engineering capacity. Advanced mode requires correct ordering of the default, the tag load and the update. Basic mode requires correct blocking. Both fail silently if the CMP integration is wrong.
- Consider regional rules. You can combine a regional default with either mode. The regional default decides the starting state, and the mode decides whether tags load while that state is denied.
You can also change mode later, but the data will change at the switch date. Annotate the change in your reporting, because a jump in users or sessions on that date reflects the new collection, not new traffic.
Common errors
- Setting the default after the tag loads. In advanced mode this sends the first hits with an unset state. Check the order in your page source or in the GTM consent initialization trigger.
- Believing "advanced" means "full data". Pings are not events. They do not create a persistent user, so denied traffic does not appear as normal sessions in reports. Modelling is the only route back into reports.
- Treating "basic" as "advanced with no modelling". Basic mode sends nothing from denied visitors, so there is nothing to compare or model in GA4.
- Calling
updatewith a partial state and assuming the rest is granted. Signals you leave out keep their previous value. Send every signal you intend to change. - Using a CMP template that sets defaults but also fires tags early. Some setups set
deniedcorrectly but still let tags fire on a non-consent trigger, which turns a basic design into a partial advanced one.
What this means for your reports
The mode you pick sets how big the gap is and whether GA4 can estimate any of it. Under basic mode the gap is silent: reports show less traffic and you cannot see the missing portion. Under advanced mode the gap is partly visible and partly modelled. Later chapters cover what GA4 receives from denied visitors, where the gaps show up, and how to check that your chosen mode works in Tag Assistant, DebugView and BigQuery.
Exercise
A site loads its Google tag only after the visitor clicks Accept. Its consent default is denied for all four signals. The team asks why GA4 behavioral modelling shows no modelled data for the property. Which mode is the site running, and what is the reason?
Show answer
The site is running basic mode, because the tag does not load until after the choice. Denied visitors send no pings, so GA4 has no data from them to learn from, and behavioral modelling is not available. To get modelling, the team would have to switch to advanced mode (load the tag with a denied default, with legal sign-off for pre-consent pings) and also meet the eligibility conditions.
Exercise
In advanced mode, a visitor lands on a page, rejects the banner, then browses five more pages. How does GA4 see this visitor, and what happens to the data if the same visitor later accepts on a different day?
Show answer
While consent is denied, the tags send cookieless pings with no persistent client ID, so GA4 cannot link the six page views into one user or session. Those pings do not show as normal sessions. If the visitor accepts later, the update applies only to later hits. New hits are collected with cookies, and the earlier pings are not rewritten or merged into the new identity.