OneTrust and Google don't speak the same language. OneTrust groups cookies into categories like Performance and Targeting. Google Consent Mode wants answers to specific questions: may I store analytics cookies? May I use this person's data for ads? Someone has to translate, and if nobody decides how, the translation gets made by default settings you never looked at.
The seven questions Google asks
Consent Mode has seven types. Four of them matter most:
analytics_storagefor Google Analytics cookiesad_storagefor advertising cookiesad_user_datafor sending user data to Google for adsad_personalizationfor remarketing and personalised ads
The last two arrived with Consent Mode v2 in 2024. If you advertise to visitors in the EEA or the UK and those two are missing, Google Ads stops building audiences for them.
The other three are functionality_storage, personalization_storage and security_storage. Google's own tags mostly ignore them, but other tags in GTM can check them.
A mapping I use
| OneTrust category | Consent Mode types |
|---|---|
C0001 Strictly necessary | security_storage |
C0002 Performance | analytics_storage |
C0003 Functional | functionality_storage, personalization_storage |
C0004 Targeting | ad_storage, ad_user_data, ad_personalization |
C0005 Social media | None |
Targeting carries all three ad types. Leave ad_user_data unmapped and it stays denied forever, even for people who click Accept all. Reports look fine. Remarketing lists just never grow.
Social media maps to nothing because Google doesn't have a type for it. If you run the Meta Pixel, it should listen to C0004 or C0005 directly, depending on which category your privacy team put it in. Your category IDs may differ from these, so check them in OneTrust first.
Pick one place to set defaults
Consent Mode needs a default state on every page, set before any Google tag runs. With OneTrust there are two common ways to do it.
The first is OneTrust's built-in Google Consent Mode setting. You switch it on in OneTrust, map categories to types there, and OneTrust sends both the default and every update. For this to work, the OneTrust script has to be in the page before the GTM snippet.
The second is the OneTrust CMP template from the GTM Community Template Gallery. It runs on the Consent Initialization trigger, sets the defaults inside GTM and listens for changes.
Either works. Using both is the mistake. Two defaults, possibly with different values, and the order between them can change from page to page. In GTM Preview, click the Consent Initialization event and open the Consent tab. If you see the default set twice, turn one of them off.
My preference is the template inside GTM. The mapping then sits next to the tags that depend on it, and anyone who opens the container can see it.
Give the banner a moment
A returning visitor has already said yes, but OneTrust takes a fraction of a second to read the stored choice. If GA4 fires before that, the first hit goes out as denied.
wait_for_update fixes this. Set it to 500 milliseconds in your default, and Google tags hold their first request until the update arrives or the time runs out. Both OneTrust's setting and the GTM template have a field for it.
Defaults by region
Your default doesn't have to be the same everywhere. A common setup denies everything by default for the EEA, the UK and Switzerland, and grants analytics elsewhere. OneTrust's geolocation rules handle this, and the GTM template can set region-specific defaults too.
Which regions get which defaults is a legal question, not a tagging one. My job is to make sure whatever was decided actually happens on the page. Test it with a VPN or a browser extension that changes your location, and look at the gcs value in GA4's requests, as I described in Does your cookie banner block anything?
