Title: Customizing Cookiebot
Last modified: October 26, 2018

---

# Customizing Cookiebot

 *  Resolved [pramakrishna](https://wordpress.org/support/users/pramakrishna/)
 * (@pramakrishna)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/customizing-cookiebot/)
 * Hi,
 * I have found out that the marketing cookies should only be ticked if the user
   clicks on “OK”. That is why the check boxes should not be on the cookie notification.
   Having the marketing box pre-checked (within the banner) is not compliant with
   the “privacy by default” principle under the GDPR.
 * So is it possible to have a separate board for the cookie settings (not together
   with the cookie banner) ?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustomizing-cookiebot%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [martinivanov](https://wordpress.org/support/users/martinivanov/)
 * (@martinivanov)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/customizing-cookiebot/#post-10818737)
 * [@pramakrishna](https://wordpress.org/support/users/pramakrishna/)
 * If I understanding correctly, you want “marketing cookie” to be in a separate
   banners, which is not possible. You can change the setting in the admin panel
   and leave the “marketing” checkbox empty to be compliant with the “privacy by
   default” principle under the GDPR.
 * Regards,
    Martin
 *  Thread Starter [pramakrishna](https://wordpress.org/support/users/pramakrishna/)
 * (@pramakrishna)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/customizing-cookiebot/#post-10818805)
 * Hi,
 * Okay then is it possible to customize the plugin in such a way where we can have
   buttons to opt-in and opt-out from separate cookies like marketing/ statistics??
 *  Plugin Author [cookiebot](https://wordpress.org/support/users/cookiebot/)
 * (@cookiebot)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/customizing-cookiebot/#post-10818837)
 * [@pramakrishna](https://wordpress.org/support/users/pramakrishna/) as previously
   answered it is not currently possible to give consent by not using the banner.
 * [https://wordpress.org/support/topic/adding-script-inside-your-code-to-customize-the-plugin-as-per-development-page/](https://wordpress.org/support/topic/adding-script-inside-your-code-to-customize-the-plugin-as-per-development-page/)
 *  Plugin Author [cookiebot](https://wordpress.org/support/users/cookiebot/)
 * (@cookiebot)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/customizing-cookiebot/#post-10847267)
 * [@pramakrishna](https://wordpress.org/support/users/pramakrishna/) We have updated
   our API to support your needs.
 * Instead of using the banner to change consent, you can call:
 * `Cookiebot.submitCustomConsent(optinPreferences, optinStatistics, optinMarketing)`
 * Where optinPreferences, optinStatistics, optinMarketing are bool values.
 * If you only want to change one consent category, you can retrieve what the user
   has already selected for the other categories, through the Cookiebot object.
 *     ```
       Cookiebot.consent.preferences
       Cookiebot.consent.statistics
       Cookiebot.consent.marketing
       ```
   
 * Hope this helps!
 *  Thread Starter [pramakrishna](https://wordpress.org/support/users/pramakrishna/)
 * (@pramakrishna)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/customizing-cookiebot/#post-10874802)
 * Hi,
 * there is a bug in this new function
 * `Cookiebot.submitCustomConsent(optinPreferences, optinStatistics, optinMarketing)`
 * This doesn’t work on Mozilla. But works fine on Chrome and Edge.
 * It doesn’t change the cookie consent at all
 * [Test link](https://mts.betradar.com/)
 *  Plugin Author [cookiebot](https://wordpress.org/support/users/cookiebot/)
 * (@cookiebot)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/customizing-cookiebot/#post-10874871)
 * Hi [@pramakrishna](https://wordpress.org/support/users/pramakrishna/),
 * How do you test that it is not working?
 * If you write
 * `Cookiebot.submitCustomConsent(false, false, false)` in the developer Console,
   and afterwards check the values of
 *     ```
       Cookiebot.consent.preferences
       Cookiebot.consent.statistics
       Cookiebot.consent.marketing
       ```
   
 * You will see that they are all false.
 * Every time we consent on that site however, we get the following error:
 * > SecurityError: Permission denied to access property “frameElement” on cross-
   > origin object
 * Could you check if the logic behind accessing frameElement is what is causing
   your issue, as it seems not to be Cookiebots fault.
    -  This reply was modified 7 years, 6 months ago by [cookiebot](https://wordpress.org/support/users/cookiebot/).
 *  Thread Starter [pramakrishna](https://wordpress.org/support/users/pramakrishna/)
 * (@pramakrishna)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/customizing-cookiebot/#post-10876250)
 * Hi,
 * When you go to this page “[https://mts.betradar.com/cookies/&#8221](https://mts.betradar.com/cookies/&#8221);
   and click on the button “I accept” inside the banner and then you try to opt-
   out from the “marketing” cookie by clicking the opt-out for example, then you
   see the color of the button changes and the text also changes to opt-in. But 
   when you inspect the cookie status inside the inspector of Mozilla Firefox, you
   can see that marketing is still true and even after clicking the button multiple
   times, the consent of marketing never changes (even after page refresh).
 * But works fine on Chrome, Microsoft Edge, Safari and Chromium browsers
 *  Plugin Author [cookiebot](https://wordpress.org/support/users/cookiebot/)
 * (@cookiebot)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/customizing-cookiebot/#post-10878754)
 * [@pramakrishna](https://wordpress.org/support/users/pramakrishna/)
 * By inspecting the button `cookieoptout` (marketing opt-out), there is a click
   event with the below code:
 *     ```
       function() {
         var g = document.getElementById("cookieoptout");
         g.setAttribute("style", "background: #fff; display:none;");
         var h = document.getElementById("cookiechange");
         h.style.display = "block";
         Cookiebot.consent.marketing = false;
         //  console.log("Marketing is false", Cookiebot.consent.marketing); 
       }
       ```
   
 * Apparently you are setting the value of `Cookiebot.consent.marketing` directly.
   You should use the function `Cookiebot.submitCustomConsent(bool, bool, bool)`
 *  Thread Starter [pramakrishna](https://wordpress.org/support/users/pramakrishna/)
 * (@pramakrishna)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/customizing-cookiebot/#post-10878868)
 * Yes, that is used inside the button.
 *     ```
       <p style="">
       <button id="cookieoptoutga" style="display: block;">
       <a class="bttn" href="javascript: Cookiebot.submitCustomConsent(Cookiebot.consent.preferences,false,Cookiebot.consent.marketing); Cookiebot.hide();" style="">Opt Out</a>
       </button>
       </p>
       ```
   
 * It changes the cookie consent using this button on all browsers except Mozilla
   Firefox
 *  Thread Starter [pramakrishna](https://wordpress.org/support/users/pramakrishna/)
 * (@pramakrishna)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/customizing-cookiebot/#post-10878881)
 * Here, the main problem that is happening is that function “submitCustomConsent”
   doesn’t change the cookie consent on Mozilla. But when clicked “I accept” inside
   the banner, only then it changes the cookie consent. And this is happening only
   on Mozilla Firefox browser.
 *  Plugin Author [cookiebot](https://wordpress.org/support/users/cookiebot/)
 * (@cookiebot)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/customizing-cookiebot/#post-10886473)
 * [@pramakrishna](https://wordpress.org/support/users/pramakrishna/) which version
   of Mozilla are you using? Can’t seem to replicate it with Firefox Developer Edition.

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

The topic ‘Customizing Cookiebot’ is closed to new replies.

 * ![](https://ps.w.org/cookiebot/assets/icon.svg?rev=3200631)
 * [Cookiebot by Usercentrics - Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode](https://wordpress.org/plugins/cookiebot/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookiebot/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookiebot/)
 * [Active Topics](https://wordpress.org/support/plugin/cookiebot/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookiebot/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookiebot/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [cookiebot](https://wordpress.org/support/users/cookiebot/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/customizing-cookiebot/#post-10886473)
 * Status: resolved