Open Tracked/Guides/Push consent update event

Push consent update event

A consent update tells Tag Manager and your tags what the visitor chose, the moment they choose it. Get the order of calls right and consent works.

4 min read · Updated October 26, 2026

DDefault consentVVisitor choosesUUpdate pushed
In this guide
Key takeaways
  • Set a default consent state before Tag Manager loads, then push an update when the visitor chooses.
  • Use gtag("consent", "default", ...) and gtag("consent", "update", ...), with the four Google signals.
  • Push a custom event too if you need to trigger tags after the choice. Test accept, reject and partial.

A consent platform does two jobs: it asks the visitor, and it tells your tags what they said. The second job is a pair of small calls, and the details decide whether your tags behave. Many problems come from the update arriving late, or from the default being set after the container loads. This page shows the calls, the order and a testing routine. It assumes Google Consent Mode; see Consent Mode v2 for the ideas, and cookie banners for the whole set-up.

The order that works

1

Define the data layer and gtag function

Before any other script.

2

Set the default consent

Before the Tag Manager snippet loads.

3

Load Tag Manager

Tags now see the default state.

4

Show the banner

Your consent platform asks the visitor.

5

Push the update

When the visitor chooses, and on later visits when a stored choice is read.

Set up in minutes

Connected in minutes

Add your domain, install the pixel, connect your ad platforms and watch the first events land.

The default

<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){ dataLayer.push(arguments); }
  gtag("consent", "default", {
    ad_storage: "denied",
    analytics_storage: "denied",
    ad_user_data: "denied",
    ad_personalization: "denied",
    wait_for_update: 500
  });
</script>
<!-- Tag Manager snippet goes after this -->

wait_for_update gives your consent platform a short time, in milliseconds, to send a stored choice before tags decide what to do. Use a value that suits your platform. Set defaults to denied for regions where opt-in is required. You can set different defaults by region with the region option.

The update

gtag("consent", "update", {
  ad_storage: "granted",
  analytics_storage: "granted",
  ad_user_data: "granted",
  ad_personalization: "granted"
});
// optional: a custom event your triggers can listen to
dataLayer.push({ event: "consent_updated" });

Most consent platforms make these calls for you. Check their documentation and verify with Preview rather than trusting the settings page.

Try it

Works with your stack

Grab a logo and throw it. These are the tools Open Tracked already talks to.

Grab one. Throw it.

Why a custom event helps

Some tags are not consent-aware and fire only on a trigger. You can fire them on a custom event such as consent_updated, with a condition that checks the consent state, so they run after the choice and not before. Google's own tags adjust automatically through Consent Mode.

Server-side

The web container sends the consent state with its requests (in parameters such as gcs and gcd). A server container reads them. Add consent settings or trigger conditions to server tags that send personal data, such as Meta and TikTok. With Open Tracked, the Enricher has consent switches for what it may store and add, and Cookie Keeper only restores what you allow. See GTM and GDPR.

Test

  1. Open Preview and load the page in a private window.
  2. Check the Consent tab: default state shown for each tag.
  3. Choose reject: tags that need consent should not fire.
  4. Choose accept: the update should appear and tags should fire.
  5. Reload: the stored choice should be read and the update pushed quickly.
  6. Check the server Preview for the consent state on requests.

Common problems

SymptomTags fire before the choice
Likely causeThe default is set after the container, or not set.
FixMove the default above the snippet.
SymptomThe update does not take effect
Likely causeIt is pushed with the wrong signal names.
FixUse the four exact names.
SymptomReturning visitors are treated as new
Likely causeThe stored choice arrives after wait_for_update.
FixIncrease it slightly or fix the platform.
SymptomServer tags ignore consent
Likely causeNo consent setting on server tags.
FixAdd one.
0 of 6 done
Works worldwide

Runs on your domain, anywhere

Your tracking runs on your own domain, so a visit from any country is handled the same way.

Frequently asked questions

What is a consent update?

A call that tells tags the visitor's new consent choices after the default state.

What does wait_for_update do?

It gives your consent platform a short time to send a stored choice before tags decide what to do.

Do I need a custom event?

Only for tags that are not consent-aware and need a trigger after the choice.

How do I test consent?

In Preview, in a private window, with accept, reject and partial choices.

Does the server container need the consent state?

Yes, so server tags can respect it.

Do I need spreadsheets to read my results?

No. Once tracking is live, the Open Tracked analytics shows spend, revenue, ROAS and profit, and you can ask Ari, the built-in AI assistant, questions about your own numbers in plain words. Ari's allowance depends on your analytics plan.

Is Open Tracked different from Open Track or Open Space Track?

No. Open Tracked is the official name of our server-side tracking platform, and the website is opentracked.io. Many people search for it as Open Track, OpenTrack or Open Space Track. All of them lead to the same product: server-side Google Tag Manager hosting, first-party analytics and a CRM pipeline.

Fix your tracking at the source

Open Tracked hosts your server-side Tag Manager, keeps first-party cookies alive and shows what each ad is really worth.

Open Tracked
Written by

The Open Tracked team

We build Open Tracked: server-side tracking hosting, analytics and the tools around them, for stores that spend on ads. Questions about this guide, or an idea for the next one?

Write to us Read the docs

Was this article helpful?

Comments

Loading comments...

Turn better tracking into better marketing performance

Start free