Title: Cookies Declined
Last modified: March 22, 2018

---

# Cookies Declined

 *  Resolved [livpete](https://wordpress.org/support/users/livpete/)
 * (@livpete)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/cookies-declined/)
 * Hi Cookiebot team,
 * Just installed your WordPress plugin on our site, but I’m not sure how much more
   I need to do to configure it?
 * With the plugin installed, will it (for example) stop Google Analytic cookies
   being dropped on a user’s computer if they refuse cookies? Or is further work
   needed?
 * Also, I get how to apply the attribute “data-cookieconsent” on cookie-setting
   scripts – but the GA example applies to the Universal script tag, not the Global
   Site Tag (gtag) we use. Is there a significant difference to apply this?
 * Many thanks!

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

 *  Plugin Author [cookiebot](https://wordpress.org/support/users/cookiebot/)
 * (@cookiebot)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/cookies-declined/#post-10102668)
 * Hi Pete,
 * Thanks for reaching out!
 * > Just installed your WordPress plugin on our site, but I’m not sure how much
   > more I need to do to configure it?
   > With the plugin installed, will it (for example) stop Google Analytic cookies
   > being dropped on a user’s computer if they refuse cookies? Or is further work
   > needed?
 * Once you’ve installed the Cookiebot plugin, your site is not necessarily GDPR
   complaint, until you mark your cookie setting script tags with Cookiebots data
   attributes.
 * You can find more information on how to do that at our help page:
 * [https://www.cookiebot.com/goto/help](https://www.cookiebot.com/goto/help)
 * After you’ve installed the Cookiebot plugin, you need to scan your website for
   cookies.
 * If you’re already signed up, you can request a scan for your domain through our
   manager:
 * [https://manage.cookiebot.com/](https://manage.cookiebot.com/), under the “Cookies”
   tab.
 * Once the scan is complete, you can check the scan report, under the “Reports”
   tab, which shows all cookies our scanner found, and which JavaScript files set
   those cookies.
 * Once you have that information, you should be able to mark your script tags.
 * > Also, I get how to apply the attribute “data-cookieconsent” on cookie-setting
   > scripts – but the GA example applies to the Universal script tag, not the Global
   > Site Tag (gtag) we use. Is there a significant difference to apply this?
 * There is no difference, you can use the same data attribute on the Global Site
   Tag. Alternatively, you can choose to control the cookie consent for Global Site
   Tag through Google Tag Manager:
 * [https://cybot.uservoice.com/knowledgebase/articles/425087-google-tag-manager-deployment](https://cybot.uservoice.com/knowledgebase/articles/425087-google-tag-manager-deployment)
 * _[ [Signature deleted](https://wordpress.org/support/guidelines/#avoid-signatures)]_
    -  This reply was modified 8 years, 1 month ago by [cookiebot](https://wordpress.org/support/users/cookiebot/).
    -  This reply was modified 8 years ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
 *  Thread Starter [livpete](https://wordpress.org/support/users/livpete/)
 * (@livpete)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/cookies-declined/#post-10104346)
 * Thanks for replying.
 * As far as the Google Analytics point is concerned, where would I apply the attribute
   if the tracking code looks like this?
 *     ```
       <!-- Global site tag (gtag.js) - Google Analytics -->
       <script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-X"></script>
       <script>
         window.dataLayer = window.dataLayer || [];
         function gtag(){dataLayer.push(arguments);}
         gtag('js', new Date());
   
         gtag('config', 'UA-XXXXXXXX-X');
       </script>
       ```
   
 * The first script tag or the second?
 *  Plugin Author [cookiebot](https://wordpress.org/support/users/cookiebot/)
 * (@cookiebot)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/cookies-declined/#post-10106827)
 * Step 3 on our help page describes what you have to do:
 * > To enable prior consent, apply the attribute “data-cookieconsent” to cookie-
   > setting script tags on your website. Set the comma-separated value to one or
   > more of the cookie categories “preferences”, “statistics” and “marketing” in
   > accordance with the types of cookies being set by each script. Finally change
   > the attribute “type” from “text/javascript” to “text/plain”
 * Example:
 *     ```
       <!-- Global site tag (gtag.js) - Google Analytics -->
       <script type="text/plain" data-cookieconsent="statistics" async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-X"></script>
       <script>
         window.dataLayer = window.dataLayer || [];
         function gtag(){dataLayer.push(arguments);}
         gtag('js', new Date());
   
         gtag('config', 'UA-XXXXXXXX-X');
       </script>
       ```
   
 * This will ensure that gtag.js is executed when the user gives consent to statistics
   cookies.
 * If you are using gtag for marketing purposes as well, you have to use
 * > data-cookieconsent=”statistics,marketing”
 * Example:
 *     ```
       <!-- Global site tag (gtag.js) - Google Analytics -->
       <script type="text/plain" data-cookieconsent="statistics,marketing" async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-X"></script>
       <script>
         window.dataLayer = window.dataLayer || [];
         function gtag(){dataLayer.push(arguments);}
         gtag('js', new Date());
   
         gtag('config', 'UA-XXXXXXXX-X');
       </script>
       ```
   
 * _[ [Signature deleted](https://wordpress.org/support/guidelines/#avoid-signatures)]_
    -  This reply was modified 8 years ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).

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

The topic ‘Cookies Declined’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [cookiebot](https://wordpress.org/support/users/cookiebot/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/cookies-declined/#post-10106827)
 * Status: resolved