How to Set Up Google Consent Mode v2 (Step by Step)
To set up Google Consent Mode v2, set the four consent signals to denied before any Google tag loads, load your Google tags, then send an update that flips the signals to granted when the visitor accepts. The order is the whole trick: the default has to run first, or your tags fire before consent and you breach UK PECR.
You can do this in gtag directly or through Google Tag Manager. Both follow the same sequence.
The steps
- Set the denied defaults high in the
<head>, before your Google tag. Send a Consent Mode default command that setsanalytics_storage,ad_storage,ad_user_dataandad_personalizationto denied. Addwait_for_updateso Google waits briefly for the visitor's choice. - Load GA4 or Google Tag Manager after the default. With the default in place, your tags start consent-aware and hold back cookies and measurement.
- Send the update when the visitor accepts. Your banner sends a Consent Mode update that sets the granted signals. From that point GA4 and Google Ads measure in full.
- Verify it. Open your site in a private window. Before you accept, check that no
_gacookie is set and that Google's Tag Assistant shows the signals as denied. Accept, and confirm they switch to granted.
Doing it in Google Tag Manager
In GTM the sequence is the same, but you place the default command in a Consent Initialisation trigger so it runs before every other tag. Then your consent tool sends the update. Getting the trigger order wrong is the most common GTM mistake, so confirm the default sits in Consent Initialisation, not All Pages.
The shortcut
Wiring the defaults, the timing and the update by hand is fiddly, and a single ordering slip breaks compliance. Consentfolio ships the whole sequence in one snippet: the denied defaults run first, the banner renders, and accepting sends the update. You paste one tag and the order is correct by construction. See the Google Consent Mode v2 guide for the background and Consent Mode basic vs advanced for which mode to run.
Frequently asked questions
Where do the denied defaults go?
High in the <head>, before your GA4, Google Ads or Google Tag Manager tag. In GTM, in a Consent Initialisation trigger. The default must run before any Google tag.
What is wait_for_update?
A short delay, in milliseconds, that tells Google to wait for the visitor's consent choice before deciding how tags behave. It stops tags acting on the denied default when the visitor is about to accept.
How do I check Consent Mode is working? Use Google's Tag Assistant to watch the four signals change from denied to granted when you accept, and confirm no analytics cookie is set before consent.
Written by Tudor Rusmanica, founder of Consentfolio. Tudor has spent over a decade in agency SEO, working where search performance meets data protection: the analytics, tagging and consent setups that keep measurement useful and lawful. Connect on LinkedIn.
Published 13 July 2026. Last reviewed 13 July 2026.