Get Google Consent Mode to report granted after visitors click "I Agree"
Google Consent Mode stays denied after a click on the "I Agree" button in TermsFeed Privacy Consent when no complete update reaches Google, or when a second sender overrides it. Your setup decides who sends the update. A vendor added from a Google template makes Privacy Consent send the denied default, the update after each answer, and the update for returning visitors. A custom vendor sends none of these, so your own code has to send all 3.
Find out which setup you have on the "Vendors" page of the TermsFeed app. A vendor added from a Google template means Privacy Consent sends the signals, so check Cause 1, Cause 4, and Cause 5. With no such vendor, every cause applies to your own code.
How to read consent state in Google Tag Assistant
Google Tag Assistant is the free Google tool that shows every consent command a page sends and the state each Google tag sees. Read it once before the answer and once after I Agree, in a new private window.
- Open Google Tag Assistant, select "Add domain", and enter the address of your page.
- Select "Connect". Your page opens in a new window, and Tag Assistant lists the events of the page.
- Select an event in the list, then open the Consent tab.
- Read the 3 columns for each signal: On-page Default, On-page Update, and Current State.
- Click I Agree on the consent banner in your page window, select the newest event in Tag Assistant, and read the Consent tab again.
A working setup shows denied as the On-page Default for ad_storage, analytics_storage, ad_user_data, and ad_personalization. After I Agree, it shows granted as the On-page Update and the Current State.
Cause 1: The default runs after the Google tag
Google applies a consent default only to tags that run after it, so a default placed below the Google tag or the Google Tag Manager container comes too late. Those tags fire with no consent state, and Tag Assistant reports that a tag read consent before a default was set. With a Google template, the same result comes from a copy of the Google tag or container left in your page templates, which loads before Privacy Consent sends the defaults.
Select the first events in Tag Assistant. The Consent event with the default appears after the Container Loaded event or the first tag event, when it needs to come before them. In the Elements tab of DevTools, search for <script and find the Google tag above your gtag('consent', 'default', ...) block.
Restore the order that matches your setup. Check the whole order in Install the Script.
- With a Google template, delete every copy of the Google tag or container from your page templates.
- With your own code, move the inline default block to the top of the
<head>, then the Privacy Consent snippet. Move the Google tags into the on-accept vendor tag of a custom vendor. - Keep your default inline in the page, never inside Google Tag Manager or a file that loads late.
- Purge any page cache, reload with Tag Assistant connected, and confirm that the default event comes first.
Cause 2: The callback does not send an update
Privacy Consent calls your callback after a click on the "I Agree" button, and with your own code Consent Mode changes only when that callback sends gtag('consent', 'update', ...). A visitor who accepts only part of the vendor categories triggers acceptedSome, so a callback only on acceptedAll misses those answers. Each v1.callbacks() call replaces all 4 callbacks, which lets a second integration remove yours.
Tag Assistant shows what arrived after I Agree. No new Consent event means the callback did not send an update. An update that sets ad_storage and analytics_storage and leaves ad_user_data and ad_personalization at denied comes from a callback written for the first version of Consent Mode. In the Console tab, a callback that throws prints its [ee] code, followed by your own error.
Install one set of callbacks and send the complete update from each answer. Copy the complete block from Google Consent Mode v2, and check when each callback runs in Callbacks and Consent Semantics.
- Place the integration snippet once in an inline block before the Privacy Consent snippet.
- Send an update with every signal from
acceptedAll,acceptedSome, andrejectedAll. - Merge every integration that needs callbacks, such as Consent Mode and a data layer push, into that one object.
- Reload with Tag Assistant connected, click I Agree, and confirm the new On-page Update.
Cause 3: Returning visitors do not get a restore
Privacy Consent does not call an answer callback on page load for a returning visitor, so your own code has to send the update on every later page. Without it, the second page starts on the denied default although the visitor accepted. The answer sits in local storage under the key termsfeed_privacy_consent_state, and your restore code reads it from there.
Test with a returning visitor. Click I Agree, reload the page, and select the first events in Tag Assistant. An On-page Default of denied with no On-page Update on the new page shows the gap, while the Application tab of DevTools still holds the answer.
Add the restore to the block in the <head>, then test it again. Copy the restore code from Google Consent Mode v2.
- Read
termsfeed_privacy_consent_stateright after the default, and sendgtag('consent', 'update', ...)for each accepted vendor category. - Set
wait_for_updatein the default, such as 500 milliseconds (0.5 seconds), so Google tags wait for the update. - Reload and confirm the On-page Update on the first event.
Cause 4: The vendor category maps to the wrong signal
The vendor category decides which Google signal turns granted, so a vendor in the wrong vendor category or a wrong mapping in your code leaves a signal denied. Privacy Consent uses the vendor category IDs essential, functionality, analytics, advertising, and marketing. Code copied from TermsFeed Free Cookie Consent checks tracking and targeting, which never match. A vendor category with some vendors on and some off counts as declined, so its signals stay denied by design.
Compare the stored answer with what Tag Assistant shows. After I Agree, type this line in the Console tab of DevTools and read enabled for each vendor category.
JSON.parse(localStorage.getItem('termsfeed_privacy_consent_state')).consentState.categories
Accepted vendor categories with denied signals point to the mapping, so correct it and test again. Copy the mapping into your own code from Category Mapping.
- Correct the mapping in your own code.
- Check every ID in your code against the 5 lower-case IDs.
- Move each Google vendor to the vendor category that matches its purpose, such as Google Analytics 4 to Analytics.
- Reload with Tag Assistant connected, click I Agree, and confirm
grantedfor each signal of the accepted vendor categories.
Cause 5: A second consent system overrides the signal
A second tool that sends Consent Mode commands overrides the update from Privacy Consent, because Google applies the latest update until the next one arrives. A platform consent banner, a WordPress analytics plugin, a consent template in Google Tag Manager, and an earlier consent tool each send their own commands. So does Consent Mode code you pasted into the <head> beside a Google template.
Tag Assistant shows the second sender. An update with denied after your update with granted is the sign, and more than one Consent event with a default points the same way. In the Elements tab of DevTools, search for 'consent' to find each block that sends a command.
Keep a single sender of Consent Mode commands. Turn off the consent banner of the platform or plugin too, with 2 Consent Banners.
- Choose Privacy Consent through a Google template, or your own code fed by the callbacks.
- Turn off the consent mode setting of the plugin or platform, and remove any consent template from Google Tag Manager.
- Remove hand-pasted Consent Mode code from a page that uses a Google template.
- Reload with Tag Assistant connected and confirm that a single update follows I Agree.
How to verify that Consent Mode reports granted
Run the test with Tag Assistant connected, once any page cache is purged. The gcs parameter on a Google request reports the state: G111 means ad_storage and analytics_storage granted, and G100 means both denied.
- Connect Tag Assistant to your page in a new private window, and confirm that the first Consent event shows
deniedas the On-page Default. - Click I Agree, select the newest event, and confirm
grantedforad_storage,analytics_storage,ad_user_data, andad_personalizationin the On-page Update. - Reload the page and confirm that the first events show an On-page Update of
grantedright after the default. - Open the Network tab of DevTools, type
gcs=in the filter, and confirm that requests after I Agree carrygcs=G111. - Close every private window, repeat in a new one with I Decline, and confirm
deniedin Tag Assistant. With a Google template, requests keepgcs=G100. With the Google tag in a custom vendor, no request to Google goes out.
A visitor who accepts only some vendor categories shows the matching mix in Tag Assistant.