Title: Consent Mode v2 &#8211; Implementation Issues
Last modified: April 2, 2024

---

# Consent Mode v2 – Implementation Issues

 *  Resolved [ycdevs](https://wordpress.org/support/users/ycdevs/)
 * (@ycdevs)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/consent-mode-v2-implementation-issues/)
 * First and foremost, I would like to thank you for your tremendous effort and 
   continuous updates to the plugin. It’s great that the topic of Consent Mode v2
   has been addressed. However, we have noticed a few inconsistencies, namely:
 * A) Incorrect implementation of gtag(“consent”, “default”) and gtag(“consent”,“
   update”) – the googleConsentMode() function. As the documentation states, upon
   the initial page load, gtag(“consent”) was introduced with all “consent” settings(
   ad_storage, ad_user_data, ad_personalization, analytics_storage) set to “denied”.
 * After selecting specific data processing consents (Statistics, Experience, Marketing),
   all (unfortunately, here we encounter another bug, which I’ll address in point
   B) settings in gtag transition to “granted” through the action
 *     ```wp-block-code
       gtag('consent', 'update', {
         ad_storage: "granted",
         ad_user_data: "granted",
         ad_personalization: "granted",
         analytics_storage: "granted"
       })
       ```
   
 * and upon page reload, all the above settings are switched from “update” mode 
   to “default” mode using the setting
 *     ```wp-block-code
       gtag('consent', 'default', {
         ad_storage: "granted",
         ad_user_data: "granted",
         ad_personalization: "granted",
         analytics_storage: "granted"
       })
       ```
   
 * **which causes a significant problem in correctly interpreting consent mode v2.**
 * The correct sequence of tasks execution for gtag upon each page reload is as 
   follows:
    1. Set gtag(“consent”, “default”) to “denied” and set the page load time to capture
       the saved data processing consents (Statistics, Experience, Marketing)
 *     ```wp-block-code
       gtag("consent", "default", {
         ad_storage: "denied",
         ad_user_data: "denied",
         ad_personalization: "denied",
         analytics_storage: "denied",
         functionality_storage: "denied",
         personalization_storage: "denied",
         security_storage: "granted",
         wait_for_update: "2000"
       })
       ```
   
    2. Update gtag(“consent”, “update”) to “granted” for the selected (point B) and
       saved data processing consents (Statistics, Experience, Marketing)
 *     ```wp-block-code
       gtag("consent", "update", {
         ad_storage: "granted",
         ad_user_data: "granted",
         ad_personalization: "granted",
         analytics_storage: "granted",
         functionality_storage: "granted",
         personalization_storage: "granted",
         security_storage: "granted"
       })
       ```
   
 * Following these tasks in this order will result in the correct display of Consent
   Mode v2 in Google Tag tools. The page will initially receive “denied” for “On-
   page Default” and then the value will be changed to “granted” for “On-page Update”.
 * The “update” action is **crucial** in all of this because Google uses it to understand
   what the user agrees to and bases its other actions on it in the statistics. 
   Therefore, if someone opts out of granting data processing consents, you cannot
   rely solely on the “default” settings (which are set to “denied”), but you must
   perform the next “update” action and once again pass “denied” – so that Google
   knows that the user did not agree to data processing in the “On-page Update” 
   section. – I refer you to the documentation: [https://developers.google.com/tag-platform/security/guides/consent?hl=pl&consentmode=advanced](https://developers.google.com/tag-platform/security/guides/consent?hl=pl&consentmode=advanced)
 * You can test this on the website ([https://tagassistant.google.com/](https://tagassistant.google.com/))
   and see the correct implementation by testing the domain [https://www.cookiebot.com/](https://www.cookiebot.com/).
 * B) Lack of logical conditions for selected data processing consents (Statistics,
   Experience, Marketing)
   Currently, as written in point A), after selecting options:
    1. “Statistics” – the plugin activates gtag(“consent”, “default”, {analytics_storage:“
       denied”}), when it should be gtag(“consent”, “update”, {analytics_storage: “
       granted”}) – the update action should be performed every time the page is reloaded(
       as in point A))
    2. “Experience” – the plugin does not change gtag(“consent”)
    3. “Marketing” – the plugin activates gtag(“consent”, “default”, {ad_storage: “
       granted”, ad_user_data: “granted”,ad_personalization: “granted”}), when it should
       be gtag(“consent”, “update”, {ad_storage: “granted”, ad_user_data: “granted”,
       ad_personalization: “granted”}) – the update action should be performed every
       time the page is reloaded (as in point A))
 * Finally, I refer you to a great article that perfectly describes everything that
   needs to be done to correctly implement Consent Mode v2: [https://adequate.digital/en/consent-mode-v2-what-you-need-to-know/](https://adequate.digital/en/consent-mode-v2-what-you-need-to-know/)–
   it’s worth familiarizing yourself with it 😉
 * Once again, thank you for your work, and I hope we can implement the above updates
   😊

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [Johan Jonk Stenström](https://wordpress.org/support/users/jonkastonka/)
 * (@jonkastonka)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/consent-mode-v2-implementation-issues/#post-17553546)
 * Thank you! I will take a look at in for the next release.
 *  [allanknudsen](https://wordpress.org/support/users/allanknudsen/)
 * (@allanknudsen)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/consent-mode-v2-implementation-issues/#post-17558020)
 * First, thank you [@ycdevs](https://wordpress.org/support/users/ycdevs/) for pointing
   this out so thoroughly👍
   We have been struggling with this the last week to get
   this in place and work with Google Tag Manager and have also noticed the same
   inconsistent behaviors.Johan, I urge you to take [@ycdevs](https://wordpress.org/support/users/ycdevs/)
   points into consideration as soon as possible as we have already received emails
   from Google about our site not adopting consent mode. Please 🙏.
 * Thank you for providing a brilliant piece of work and thank you for putting all
   that hard work in to it.👍👌
 * Looking forward to the next update!
 *  Thread Starter [ycdevs](https://wordpress.org/support/users/ycdevs/)
 * (@ycdevs)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/consent-mode-v2-implementation-issues/#post-17686598)
 * [@jonkastonka](https://wordpress.org/support/users/jonkastonka/) – When can we
   expect the next release of the plugin?
 *  Plugin Author [Johan Jonk Stenström](https://wordpress.org/support/users/jonkastonka/)
 * (@jonkastonka)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/consent-mode-v2-implementation-issues/#post-17689371)
 * [@ycdevs](https://wordpress.org/support/users/ycdevs/), probably next week
 *  Thread Starter [ycdevs](https://wordpress.org/support/users/ycdevs/)
 * (@ycdevs)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/consent-mode-v2-implementation-issues/#post-17692625)
 * SUPER! Thank you 😉
 *  Plugin Author [Johan Jonk Stenström](https://wordpress.org/support/users/jonkastonka/)
 * (@jonkastonka)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/consent-mode-v2-implementation-issues/#post-17707103)
 * [@ycdevs](https://wordpress.org/support/users/ycdevs/) I think I have it sorted
   now. I have a beta that you can test if you like. Drop me a line at [jonk@followmedarling.se](https://wordpress.org/support/topic/consent-mode-v2-implementation-issues/jonk@followmedarling.se?output_format=md).
 *  [caffeinehigh](https://wordpress.org/support/users/zaphan58/)
 * (@zaphan58)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/consent-mode-v2-implementation-issues/#post-17722855)
 * Any idea when the next release will be that addresses this or is it still in 
   testing? Thank you for your hard work.
 *  Plugin Author [Johan Jonk Stenström](https://wordpress.org/support/users/jonkastonka/)
 * (@jonkastonka)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/consent-mode-v2-implementation-issues/#post-17723262)
 * It’s in testing. I will continue testing and release when I get some free time
   on my hands.
 *  [caffeinehigh](https://wordpress.org/support/users/zaphan58/)
 * (@zaphan58)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/consent-mode-v2-implementation-issues/#post-17723366)
 * Thank you 👍
 *  [allanknudsen](https://wordpress.org/support/users/allanknudsen/)
 * (@allanknudsen)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/consent-mode-v2-implementation-issues/#post-17723394)
 * Any chance to try out the beta?
 *  Plugin Author [Johan Jonk Stenström](https://wordpress.org/support/users/jonkastonka/)
 * (@jonkastonka)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/consent-mode-v2-implementation-issues/#post-17734862)
 * This is now released in 2.25

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Consent Mode v2 – Implementation Issues’ is closed to new replies.

 * ![](https://ps.w.org/cookies-and-content-security-policy/assets/icon-256x256.
   png?rev=2414719)
 * [Cookies and Content Security Policy](https://wordpress.org/plugins/cookies-and-content-security-policy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookies-and-content-security-policy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookies-and-content-security-policy/)
 * [Active Topics](https://wordpress.org/support/plugin/cookies-and-content-security-policy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookies-and-content-security-policy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookies-and-content-security-policy/reviews/)

 * 11 replies
 * 4 participants
 * Last reply from: [Johan Jonk Stenström](https://wordpress.org/support/users/jonkastonka/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/consent-mode-v2-implementation-issues/#post-17734862)
 * Status: resolved