Articles and guides on launching and growing your online store
Integrations, SEO, marketing, dropshipping and online store automation

Google Consent Mode v2: How to Set It Up for Europe and the USA Without Losing Analytics

Google Consent Mode v2 setup for Europe and the USA without losing analytics

🍪 Google Consent Mode v2: How to Set It Up for Europe and the USA Without Losing Analytics

Cookie consent is no longer just a checkbox in a banner. For ads and analytics it has become a technical signal: the browser tells Google what may be stored and what may not. If that signal is missing, in Europe you risk breaking the law and losing accurate data, and in the USA you may mishandle the "opt-out" choices of residents of certain states. Below — how Consent Mode v2 works, how Europe and the USA differ, and how to set it up in GTM and GA4 with code examples.

⚖️ Important: this article is informational and is not legal advice. Requirements and their interpretation change; check the current rules and guidance from the regulators in your jurisdiction.

🧩 1. What Consent Mode v2 is and how it works

Consent Mode is a mode in which Google tags (Analytics, Google Ads, Floodlight and tags in Tag Manager) respect the user's choice about cookies and data sharing. Technically it is two calls before and after the choice:

1
Default — the initial state. Before tags load, the page states that storage and data sharing are denied (or allowed for strictly necessary purposes). Usually it is set to denied.
2
Update — after the user's choice. When the user clicks "Accept" or "Decline", the site sends the new consent state. Google applies it to tags and models.

How it works

1. Page loadConsent default = denied before gtag.js / GTM
→
2. BannerThe user chooses "Accept" or "Decline"
→
3. Updategranted/denied signals go to Google

Key parameters that make the mode work correctly:

  • wait_for_update — how many milliseconds to wait for the user's choice before sending tags;
  • url_passthrough — passes transition parameters between pages without cookies (useful when analytics is declined);
  • ads_data_redaction — hides advertising identifiers when ad_storage is denied.

🎯 2. Why you need it: law and data retention

Consent Mode has two jobs, and both matter equally.

⚖️ Legal

Show the regulator and the user that non-essential cookies and data sharing are enabled only after consent, and that a refusal is respected.

📉 No measurement loss

On refusal, tags don't go completely blind: Google can use modeling and anonymized signals so conversion estimates stay realistic.

📊 Honest analytics

You see the difference between "no data" and "data limited by consent" instead of losing reports entirely.

🎯 Working ads

Google Ads receives ad_user_data and ad_personalization signals and correctly limits personalization on refusal.

If you simply "don't load anything without consent", you lose both data and optimization. If you load everything indiscriminately, you break the rules. Consent Mode is the compromise: the law is respected and measurements are preserved where possible.

📶 3. Consent signals: what is actually passed

Consent Mode v2 uses four main signals. They are the most commonly checked during audits and they determine how ads and analytics behave.

Four key v2 signals

ad_storage

Allows cookies and local storage for advertising (Google Ads, Floodlight).

analytics_storage

Allows cookies for analytics, such as Google Analytics.

ad_user_data

Allows sending user data to Google for advertising purposes.

ad_personalization

Allows personalized advertising and remarketing.

SignalWhat it controlsIf denied
ad_storageAdvertising cookies and identifiersAd cookies are not set, identifiers are not used
analytics_storageAnalytics cookiesAnalytics cookies are not set
ad_user_dataSending user data to Google for advertisingData is not sent for advertising purposes
ad_personalizationAd personalization and remarketingNon-personalized ads are shown

Optionally, functionality_storage, personalization_storage and security_storage may be used. Things strictly necessary for the site to work are usually allowed; the rest is consent-based.

Important: ad_user_data and ad_personalization appeared in v2. Old setups with only ad_storage and analytics_storage are no longer sufficient for advertising in the EEA.

⚙️ 4. Basic and advanced modes

ParameterBasic modeAdvanced mode
Tags before consentDo not loadLoad in a restricted mode
Cookieless signalsNoneYes (anonymized pings)
Conversion modelingLimited or unavailableAvailable with enough data
Setup complexitySimplerHigher: requires correct default and update
When it fitsSmall site, minimal measurementStore with ads and a need to estimate conversions

For an online store with advertising you usually need advanced mode: it preserves conversion estimates when some users decline cookies. But it requires careful implementation — otherwise the data becomes unreliable.

🇪🇺 5. Europe: regions and countries

In Europe the base model is prior informed consent (opt-in) for non-essential cookies and trackers. Before consent, analytics and advertising cookies must not be set, and Consent Mode must start in denied. Below is a guide to the key jurisdictions.

Region / countryLaws and regulatorModelNotes
EU / EEA (27 countries)GDPR + ePrivacy (Directive 2002/58/EC), EDPB and national regulatorsopt-inConsent before non-essential cookies; strictly necessary — without consent; refusal must be as easy as consent
United KingdomUK GDPR + PECR, ICOopt-inSimilar to the EU; separate PECR rules for cookies and electronic communications
SwitzerlandrevFADP (nFADP) + TCA, FDPICopt-in for non-essentialIts own privacy regime; for ads and analytics it's better to ask for consent
GermanyGDPR + TDDDG (formerly TTDSG), BfDI and state regulatorsopt-inStrict requirements for cookie banners and equal buttons
FranceGDPR + Loi Informatique et Libertés, CNILopt-inCNIL regulates cookies and trackers in detail; refusal must be simple
SpainGDPR + LSSI, AEPDopt-inRequirements for information and explicit consent
ItalyGDPR + Codice Privacy, Garanteopt-inStrict requirements for banners and analytics
NetherlandsGDPR + Telecommunicatiewet, APopt-inAnalytics without consent is allowed only in limited cases
PolandGDPR + PKE (Prawo komunikacji elektronicznej), UODOopt-inConsent for non-essential cookies and trackers
IrelandGDPR + ePrivacy Regulations, DPCopt-inDPC is the lead regulator for many IT companies

opt-in — consent before non-essential cookies; opt-out — request-based opt-out of sale/sharing.

💡 Practice for the EEA: set denied by default for the whole region, show a banner with equal "Accept" and "Decline" buttons, and send update after the choice. Strictly necessary cookies don't require consent, but their list must truly be necessary.

A regional default can be set separately — for example, for EEA countries, the UK and Switzerland — without affecting the rest of the world. This is done with the region parameter (see code examples below).

🇺🇸 6. USA: federal level and states

The USA has no single federal privacy law like the GDPR. Instead, individual state laws apply, and the models differ: more often it is opt-out (users can opt out of the sale/sharing of data), less often opt-in for sensitive data or minors.

For Consent Mode this means: the signals ad_storage, analytics_storage, ad_user_data and ad_personalization must be switchable based on the user's choice, and for some states you must account for "Global Privacy Control" and restrictions on selling data.

StateLawEffectiveModelNotes
CaliforniaCCPA / CPRA2020 / 2023opt-outCPPA; right to opt out of sale/sharing, GPC, opt-in for minors
VirginiaCDPA2023opt-outOne of the first "second wave" laws
ColoradoCPA2023opt-outUniversal opt-out, GPC support
ConnecticutCTDPA2023opt-outTransparency and opt-out requirements
UtahUCPA2023opt-outLighter regime than California
TexasTDPSA2024opt-outBroad business scope
OregonOCPA2024opt-outUniversal opt-out
MontanaMontana Consumer Data Privacy Act2024opt-outSeparate rules for sensitive data
DelawareDPDPA2025opt-outConsent requirements for sensitive data
IowaICDPA2025opt-outLimited set of rights
NebraskaNDPA2025opt-out—
New HampshireNHPA2025opt-out—
New JerseyNJDPA2025opt-out—
KentuckyKCDPA2025opt-out—
MarylandMODPA2025opt-outStricter restrictions on data sales
MinnesotaMCDPA2025opt-outUniversal opt-out
Rhode IslandRIDTPA2026opt-out—
IndianaINCDPA2026opt-out—
TennesseeTIPA2025opt-out—

opt-in — consent before non-essential cookies; opt-out — request-based opt-out of sale/sharing.

📋 Guideline: the list of states and dates changes every year. For the USA, configure consent signals so that a user's "refusal" disables advertising signals, not just analytics, and account for GPC where it is required.

Google supports passing Consent Mode signals for the USA, including states with privacy laws. Check the current list and guidance in Google's official help and with a qualified lawyer.

💻 7. Code examples: default and update

The main rule: default must be placed before gtag.js and GTM load. Otherwise tags will load without consent.

Step 1. Default before tags load

Place in <head> before the main Google code:

<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){ dataLayer.push(arguments); }

  gtag('consent', 'default', {
    ad_storage: 'denied',
    ad_user_data: 'denied',
    ad_personalization: 'denied',
    analytics_storage: 'denied',
    functionality_storage: 'denied',
    personalization_storage: 'denied',
    security_storage: 'granted',
    wait_for_update: 500
  });

  gtag('set', 'ads_data_redaction', true);
  gtag('set', 'url_passthrough', true);
</script>

Regional default (EEA, UK, Switzerland only)

gtag('consent', 'default', {
  region: ['ES','DE','FR','IT','PL','NL','IE','GB','CH'],
  ad_storage: 'denied',
  ad_user_data: 'denied',
  ad_personalization: 'denied',
  analytics_storage: 'denied',
  wait_for_update: 500
});

Step 2. Update after the user's choice

<script>
  function grantConsent(){
    gtag('consent', 'update', {
      ad_storage: 'granted',
      ad_user_data: 'granted',
      ad_personalization: 'granted',
      analytics_storage: 'granted'
    });
  }

  function denyConsent(){
    gtag('consent', 'update', {
      ad_storage: 'denied',
      ad_user_data: 'denied',
      ad_personalization: 'denied',
      analytics_storage: 'denied'
    });
  }
</script>

Call grantConsent() or denyConsent() from your banner button handlers. If the user has already made a choice earlier (stored in a cookie), send update right at page load without waiting for another click.

This is how a banner with equal buttons looks

We use cookies

Necessary — always. Analytics and advertising — only with your consent. You can accept or decline non-essential cookies.

🏷️ 8. Setting up Google Tag Manager

In GTM, Consent Mode is configured at the tag and container level. Steps:

1
Default — before the container. Put the gtag('consent','default',...) code in <head> above the GTM snippet. This way the container receives the initial denied state.
2
Consent Overview. In GTM open the consent overview (Admin → Consent Overview) and check which tags have consent checks configured.
3
Tag settings. For each tag: Advanced Settings → Consent Settings → add the required signals, e.g. ad_storage, ad_user_data, ad_personalization, analytics_storage. The tag won't fire until the required consent is given.
4
Triggers. Use separate triggers for analytics and ads so you don't mix consent checks. For update, you can create a Custom HTML tag that calls gtag('consent','update',...) on the choice event.

Updating consent with a GTM tag

<script>
  gtag('consent', 'update', {
    ad_storage: 'granted',
    ad_user_data: 'granted',
    ad_personalization: 'granted',
    analytics_storage: 'granted'
  });
  dataLayer.push({ event: 'consent_update' });
</script>
💡 Verification: in Preview Mode open Tag Assistant and check the Consent console. Make sure tags show "waiting for consent" before the user's choice and fire after "Accept". For a refusal, verify that ad tags don't send data.

📊 9. Setting up GA4 and Google Ads

Google Analytics 4

1
Signals are already passed. GA4 reads Consent Mode from gtag/GTM. You don't need to duplicate update separately if it is sent correctly.
2
Consent settings. In GA4: Admin → Data collection and modification → Data collection → "Consent settings". Make sure the property respects Consent Mode.
3
Modeling. Enable behavioral and conversion modeling if you need to estimate data on refusal. Modeling is not available immediately and requires enough data.
4
Google signals. This is a separate setting. Don't confuse it with Consent Mode: it's about additional user data, not the core consent signals.

Google Ads

  • Link Google Ads to GA4 and make sure conversions are passed with consent in mind;
  • In Google Ads measurement settings, check the Consent Mode status;
  • For US states where applicable, use Restricted Data Processing;
  • Verify that with ad_personalization = denied remarketing and personalization are actually limited.
📋 Menu names: Google interfaces change from time to time. If an item has a different name, look for the data collection, consent and modeling section in the GA4 property settings and in the Google Ads measurement section.

✅ 10. Verification and common mistakes

  • Default before tags. If gtag.js or GTM loaded before default, the mode won't work correctly.
  • Not just analytics. Advertising needs all four signals, including ad_user_data and ad_personalization.
  • Update after the choice. Banner buttons must actually change the state, not just close the window.
  • Stored choice. On a repeat visit, send update immediately so you don't wait for a click.
  • Single source. Don't duplicate GTM loading and don't send conflicting default calls from different places.
  • Test refusal. Test the "Decline" scenario separately, not only "Accept".
  • Region. For the EEA, UK and Switzerland use denied by default; for other regions it depends on your policy and the law.

Check results in Tag Assistant, GA4 DebugView and Google Ads reports. Look not only at "did the tag fire" but also at which consent signals it received.

🚀 11. Already built into BooStore

In BooStore you don't need to assemble consent mode manually from separate scripts: it's implemented at the platform level. Just enable it in the "Statistics" settings — and it works for both Google Analytics and Google Tag Manager.

How the built-in implementation works:

  • before GTM loads, Consent Mode default = denied is set, and if the cookie was already accepted — update = granted is sent immediately (before gtm.js);
  • the consent script loads once with both IDs (GA and GTM), a second call is skipped — there is no double container load;
  • on "Accept" or "Decline" a standard consent update is sent immediately for ad_storage, analytics_storage, ad_user_data, ad_personalization;
  • the GTM container is not reloaded — only the container from the site header remains;
  • for Analytics, consent update and config are preserved on acceptance.

The logic of the built-in consent script (files currentsite_header_java.php and hotengine-script-cookie-confirm.php) is built on exactly this scheme: first the safe denied state, then a single user-choice handler that updates all four signals and doesn't reload tags.

💡 What you need to do: in the platform settings, enable consent mode in the "Statistics" section and provide your GA and GTM IDs. After that BooStore sets the default, handles the user's choice and passes correct signals to Analytics and Tag Manager.

❓ Frequently asked questions

What is Consent Mode v2 in simple terms?
It's a mode in which Google tags respect the user's choice about cookies and data sharing. First the site says "denied" (default denied), and after the user's decision it sends "granted" or "denied" (update). This meets requirements and preserves part of the measurement.
Which signals are required for advertising?
Advertising needs ad_storage, ad_user_data and ad_personalization. Analytics needs analytics_storage. In v2 the last two advertising signals became mandatory, and they are often forgotten.
How do Europe and the USA differ on consent?
In the EEA, UK and Switzerland the base model is opt-in: non-essential cookies only after consent. The USA has no federal law; state laws apply, mostly with an opt-out model. That's why consent signals must be switchable based on the user's choice and account for local specifics.
Do I need Consent Mode if I don't show ads?
If you use Google Analytics with cookies, consent mode still helps: it correctly reflects the user's choice and helps avoid losing data entirely. Strictly necessary cookies don't require consent.
What happens if I set default granted?
In the EEA and UK this creates a risk of violation: tags may use cookies and share data without consent. The safe option is default denied for these regions and update after the choice.
How do I set up Consent Mode in GTM?
Place gtag('consent','default',...) before the container, then in Consent Overview and each tag's Consent Settings add the required consent checks. Send update after the user's choice. Verify in Preview Mode and Tag Assistant.
How do I set up Consent Mode in GA4?
GA4 reads signals from gtag/GTM. Check the "Consent settings" section in the property, and enable behavioral and conversion modeling if needed. Don't confuse Consent Mode with Google signals.
What are wait_for_update, url_passthrough and ads_data_redaction?
wait_for_update allows time for the user's choice, url_passthrough passes parameters between pages without cookies, and ads_data_redaction hides advertising identifiers when ad_storage is denied.
Can Consent Mode be used for US state laws?
Yes, Consent Mode signals can also be applied to the USA. You need to account for the specific state's model, Global Privacy Control where required, and restrictions on selling or sharing data.
Does Consent Mode affect analytics accuracy?
Yes: on refusal some data is unavailable. Advanced mode and modeling help estimate conversions, but exact values for users who refused cannot be obtained — that's the price of privacy compliance.
Do I need to write my own scripts if I use BooStore?
No. Consent mode is already built into BooStore: enable it in the "Statistics" settings and provide GA and GTM IDs — the platform sets default denied, handles the choice and sends update for the four signals to Analytics and Tag Manager.
How does BooStore handle consent technically?
Before GTM loads, default denied is set; if the cookie was already accepted, update granted is sent immediately. The consent script loads once with both IDs, and GTM is not loaded again. On "Accept"/"Decline" an update is sent immediately for ad_storage, analytics_storage, ad_user_data, ad_personalization; for GA, consent update and config are preserved.
Where do I enable consent mode in BooStore?
In the platform settings, in the "Statistics" section. There you enable consent mode and provide the system IDs. After that it works for both Analytics and Tag Manager without manual script edits.
Do I need to update the banner and privacy policy?
Yes. The banner should explain cookie categories and offer an equal refusal, and the policy should describe what data is collected and why. Consent Mode technically supports the choice, but the legal text and banner UX remain your responsibility.
Where should I start?
Identify the regions and requirements, choose basic or advanced mode, set default denied before tags, configure update from the banner, add consent checks in GTM and test both scenarios — "Accept" and "Decline".
SEO Recommendations for Websites: Complete GuideWhy Renting an Online Store is More Profitable Than Building from Scratch in 2026: Cost, Time, and Benefits ComparisonBest Tilda alternative. How to migrate your online store from Tilda to a full CMS/SaaS: step-by-step migration guide without traffic loss