All articles

Mapping OneTrust categories to Google Consent Mode

OneTrust thinks in cookie categories, Google thinks in seven consent types. A mapping that works, and the one setting that causes double defaults.

Naini Anjaneyulu, 5 December 2026

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_storage for Google Analytics cookies
  • ad_storage for advertising cookies
  • ad_user_data for sending user data to Google for ads
  • ad_personalization for 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 categoryConsent Mode types
C0001 Strictly necessarysecurity_storage
C0002 Performanceanalytics_storage
C0003 Functionalfunctionality_storage, personalization_storage
C0004 Targetingad_storage, ad_user_data, ad_personalization
C0005 Social mediaNone

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?

More articles

Does your site honour Global Privacy Control?

Some browsers tell every site "don't sell or share my data". In California that signal counts as an opt-out. Here's how to check that your site listens.

5 minute read

Opt-in for Europe, opt-out for the US: one OneTrust setup for both

European law wants permission before tracking. US state laws want a clear way to refuse. Geolocation rules let one site do both.

7 minute read

How to read OneTrust's OptanonConsent cookie

OneTrust writes every choice into one cookie. Decode it and you can answer "what did this visitor agree to?" in seconds.

5 minute read

How OneTrust tells Google Tag Manager what a visitor chose

One variable and two events carry every consent choice from OneTrust into GTM. Here's how to read them and build triggers that don't miss.

6 minute read

Consent checks or triggers? Two ways to make a tag wait in GTM

Google Tag Manager can hold a tag back with consent settings or with trigger conditions. They behave differently when a visitor changes their mind.

6 minute read

Does your cookie banner block anything?

A banner can look right and still let every tag fire. Four checks, all in your own browser.

5 minute read

How to check your dataLayer in five minutes

A quick routine, using only your browser, to see whether your site is sending the data your tags depend on.

6 minute read

Dashboards that answer one question well

Why most dashboards get ignored, and a simple way to design ones that people open every week.

7 minute read

Why tags break after a site update

The usual reasons tracking fails after a release, and a short checklist to stop it happening to you.

6 minute read

Can you trust your data?

Tell me what you track, and what you ask visitors before you track it.

Start a project