WebToffee Logo
  • Home
  • Plugins
  • Bundles
  • Blog
  • Documentation
  • Support
Login
0

  • Overview
    • Plugin set up
  • GDPR
    • Getting Started
      • Get GDPR Compliant
    • Add and Categorise Cookies
      • Troubleshoot cookie scanner
      • Add cookie manually
      • Disable cookie categories by default
      • Using cookie scanner
    • Auto-block cookies with Script Blocker
      • Compatibility with WP cache plugins
      • Configuration
      • Add custom script blocker
      • Block scripts at client side
      • Block services in Google Tag Manager separately
      • Check script blocking
    • Create Privacy Policy Page
      • Policy generator
    • Customize Settings Pop up
      • Adding cookie settings link to footer
      • Alter colour of toggle button
      • Change cookie category order in settings popup
      • Adding Custom columns into the Audit Table
      • Display category wise cookie list
    • Customize Cookie Notice
      • Category checkboxes on cookie banner
      • Geo-target cookie message bar
      • Customize banner using CSS
      • Accept consent on scroll/delay
      • Customize templates
      • Hide the cookie bar on selected pages
      • Pre-defined templates
      • Shortcodes for banner
    • Multilingual Support
      • Translate using Polylang
      • Multilingual compatibility for Necessary Category
      • Translate using WPML
      • Translate using qTranslate
      • Multilanguage compatibility for privacy policy page
    • Advanced Topics
      • Modify duration of consent
      • Access/Block site based on consent
      • Show/hide 'Privacy and Cookie Policy' tab
  • CCPA
    • Getting Started
      • Get CCPA Compliant
  • Third-Party Compatibility
    • Plugins/Themes
  • FAQ
    • Frequently asked questions
  • Changelog
    • Version 2.4.0

Documentation/GDPR Cookie Consent/How to Automatically Block Cookies Using the GDPR Cookie Consent Plugin

How to Automatically Block Cookies Using the GDPR Cookie Consent Plugin

Last updated on May 5, 2022

Heads up! This article is specifically meant for GDPR Cookie Consent Premium plugin users.

The GDPR Cookie Consent(Pro) plugin allows you to block the scripts of the cookies that are added through the plugin until the users give their explicit consent by clicking on the Accept button. The scripts will not be rendered on the website if users ignore the cookie bar or click on the Reject button denying the consent to the use of the cookies on the website.

But in some cases, the scripts of certain cookies may be added from the theme or through some other plugins of the website. These scripts cannot be blocked by clicking on the Reject button of the cookie notification bar since the scripts are not rendered through the GDPR Cookie Consent plugin. However, our plugin has the functionality to automatically block the cookies from the following third-party scripts:

  • Google Analytics
  • Facebook Pixel
  • Google Tag Manager
  • Hotjar Analytics
  • Google Publisher Tag
  • Youtube Embed
  • Vimeo Embed
  • Google Maps
  • AddThis Widget
  • ShareThis widget
  • Twitter Widget
  • SoundCloud Embed
  • SlideShare Embed
  • LinkedIn Widget
  • Instagram Embed
  • Pinterest Widget
  • Google Adsense
  • Hubspot Analytics
  • Matomo Analytics
  • Google Recaptcha

To automatically block the scripts of the cookies installed by these services using the GDPR Cookie Consent plugin, go to GDPR Cookie Consent > Script Blocker > Scripts tab. This will take you to the Manage Script Blocking page as shown in the screenshot below.

Manage Script Blocking

For e.g, let’s say your website uses Hotjar Analytics to track how the user uses your website. To ensure that the Hotjar cookies are not installed unless the users have given explicit consent, make sure that the toggle button corresponding to Hotjar is enabled. 

Alternatively, you can also choose to add the scripts(in the head/body section) via the Cookie List, especially scripts corresponding to services not listed under the Script Blocker.

By default, all the scripts in the script blocker are in an enabled state. When the script blocker is turned on, the cookie scripts will be automatically blocked. But for the users to have control over whether or not to render the scripts on the website, the scripts are assigned a category.

To autoblock scripts of plugins, move on to the Script Blocker >Plugins section. It will allow you to manage automatic script blocking for your website. The following three plugins are currently supported for auto-blocking.

  • Official Facebook Pixel
  • Smash Balloon Instagram Feed
  • Smash Balloon Twitter Feed

Plugins marked inactive are either not installed or activated on your website. Enabled plugins will be blocked by default on the front-end of your website prior to obtaining user consent and rendered respectively based on consent.

If you wish to disable automatic script blocking for any of these plugins, you can do so by simply toggling the button against the respective plugin.

You may assign any of the predefined categories or create new categories from GDPR Cookie Consent > Cookie Categories. One can also change the script’s default cookie category if required.

If the script blocker is in an enabled state, the scripts of the cookies installed by the above-mentioned cookies are blocked automatically on the website until the users give their consent. If the user rejects, all the scripts are blocked by the plugin.

Refer How to check if a cookie script is blocked to know more on it.

The GDPR Cookie Consent plugin allows you to give the users granular control over the categories of the cookies that they want to accept or reject. When using the Script blocker functionality, the user still gets to choose whether or not they want to the website to install these cookies into the website. The below screenshot shows how the users can enable or disable the cookies from the front end.

The Settings popup on the front end

To do this, categories have to be assigned to each of these scripts of the cookies in the Automatic script blocker. You may also change the assigned categories on the script blocker page.

If the toggle button for any of the scripts is disabled, the scripts for these cookies will not be blocked and the users will not have the option to enable or disable the categories assigned to the automatic script blocker.

However, if the scripts related to these cookies have been added to the GDPR Cookie Consent within the head scripts or body scripts area, and the scripts are not added anywhere else on the website, you don’t necessarily have to enable the corresponding scripts in the Manage Script blocking page. The scripts added through the plugin will only be added only when the user gives their consent.

In cases when the geo IP feature is enabled, that is the cookie bar is only visible for the visitors from the European Union, the scripts are loaded all the time for the visitors other than that of the EU, even if the automatic script blocker is enabled.

For the scripts of the cookies that are not added through the plugin and not automatically blocked by the plugin currently, we recommend that they only are added to the plugin in order to be rendered only when the user gives their consent. For example, if the scripts for the AdSense cookies are added through the theme of the website, it will not be blocked by the plugin when the users do not consent to it. Since at the moment, the scripts for AdSense are not automatically blocked by the plugin yet, the scripts should be added through the plugin to make the website comply with the GDPR Cookie Law.

  • Was this article helpful?
  • Yes, thanks!Not really

This article posted in Auto-block cookies with Script Blocker, Documentation, GDPR Cookie Consent and tagged Automatic cookie blocking, Automatic script blocking, cookie banner, Cookie consent, ePR compliance, GDPR compliance, GDPR Cookie Consent plugin, WordPress

Written by

Safwana

Safwana is a technical content writer for WebToffee. She loves working in WordPress and writing about it.

Comments (25)

  1. Maheen

    November 30, 2022

    Hello i want to block all cookies from my users when they visit my wordpress site. My site is under monetizing by ezoic. I want to show only my content base ads. No user generated cookies, is it possible. P,ease contact me via email. I need to know details

    Reply
    • Mark

      Mark

      December 4, 2022

      Hi @ Maheen,

      Greetings from Webtoffee!

      Our plugin can be used for blocking the advertisement script so that the cookies generated by it will not be loaded until a site visitor comes and gives the consent. The ads personalisation should be configured within the Ezoic dashboard. If you want to know more kindly contact our support and share your site URL so that we can guide you better.

      Reply
  2. Erika

    November 8, 2022

    Is there any way to add a text to blocked areas? For example, I have a google map script and when the script blocker is activated the area is just gray. It would be nice if it could prompt the user to accept cookies. As is, it just seems like it’s broken but if there was an embedded message, that would be more helpful.

    Reply
    • Mark

      Mark

      December 4, 2022

      Hi @ Erika,

      Greetings from Webtoffee!

      Ideally, a placeholder should appear on the maps asking the users for consent. If you are experiencing difficulty with this, kindly contact our support here.

      Reply
  3. Mario Tordini

    Francesco

    September 5, 2022

    Hi,
    I would like to customize the “Accept Functional cookies to view the content.” text that comes up when some content (e.g. video content) is being blocked.
    In particular I would like to insert a direct link/button to the Cookie settings pop up. Is it possible?
    Thanks

    Reply
    • Mark

      Mark

      October 10, 2022

      Hi Francesco,

      The default text of the placeholder for videos contains a link that when clicked calls the banner again.The category name is a clickable link in the text: “Accept Functional cookies to view the content.” We can provide a code snippet to change the text. However, since it is added through the theme the translation will not work with the text. If you are facing any issues with the link to open the banner we recommend contacting our support.

      Reply
  4. Carlos Omar

    April 25, 2022

    https://neurogene.com.br/site/
    Hi. I have a problem here!
    Before they were working, but now the accept or reject button are not working anymore

    Reply
    • Mark

      Mark

      May 2, 2022

      Hi Carlos,

      Greetings from Webtoffee!

      Please activate our GDPR Cookie Consent plugin so that we can address the issue. You are currently using a different plugin.

      Reply
  5. Jerry

    February 21, 2022

    Hello,

    I cannot see anywhere the script blocking option. That i see in this post.

    https://prnt.sc/cVH3lIikj9tj

    The plugin should automatically block scripts or not? I am using the free version of the plugin. Does this or the paid version automatically block the scripts to be gdpr ready.

    I checked if it is blocking but it is not blocking the cookies.

    Reply
    • Mark

      Mark

      February 28, 2022

      Hi Jerry,

      Greetings from WebToffee!

      This article refers to the premium version of the plugin and as such the script blocker services shown in the screenshot is available in that version only. Free version can also block the scripts but you will need to add the script as mentioned in the use-case article here.

      Reply
  6. Marcel

    January 26, 2022

    Hello. My question is if users consent logs are kept somewhere on the website and if I can access tem. Thank you.

    Reply
    • Mark

      Mark

      February 2, 2022

      Hi Marcel,

      Greetings from Webtoffee.
      The premium version does have the option to log user consent under the Consent Reports section. Logs are stored in your WordPress site database under a table named cli_visitor_details.

      Reply
  7. Rita

    January 7, 2022

    Buonasera, come faccio ad impostare nel banner il simbolo “x” come rifiuta tutti i cookie?

    Reply
    • Mark

      Mark

      January 10, 2022

      Hi Rita,
      Greetings from Webtoffee!

      The default action of “X” button is to accept cookies however you can configure it to reject all cookies by copying the code here into your themes functions.php.

      Reply
  8. Rob Voase

    Rob Voase

    February 15, 2021

    Hi,

    I am having real problems with the popup that occurs when you press ‘Settings’. It has no colour to the background so the black text is lost in the background colour of my website and my necessary and non-necessary cookies don;t appear when you expand those sections. Any ideas please?

    Thanks

    Rob

    Reply
  9. Gabriel Heffes

    Gabriel Heffes

    October 7, 2020

    Hi!

    I have several questions that are NOT answered by your document.

    1) If I have the Script Blocker Enabled and …

    The user clicks on the X ( to close ) will that allow the scripts to run or disable them?

    2) If I have the Script Blocker Disabled and …

    The user clicks on ‘REJECT’, will that disable the scripts or the scripts will stay enabled even if the user hits ‘Rejects?

    Thank you,

    Reply
    • Mark

      Mark

      October 9, 2020

      1. Cookie close button is linked to accept functionality. So that would enable the scripts.
      2. If the script blocker is disabled, the reject button click will not block the scripts. It would still run the scripts.

      Reply
  10. Andreas

    August 24, 2019

    Hi,
    When I enable the Script blocker, your cookie popup itself is blocked and does not show. What to do? (Using newest version of both WP and your plugin).

    Reply
    • Andreas

      August 24, 2019

      So I just made a few more tests and concluded that the issue only shows up when I block “Google maps embed”. I use Google Maps on the site via the widely used and very popular Toolset plugin and their Toolset Maps plugin. So I guess your plugins are incompatible? That is sad, as both of your plugins are some of the most widely used and fine plugins in their particular area of functions. Could your resolve this?

      Reply
      • Mark

        Mark

        August 24, 2019

        Please reach us via support link in the page with site login details so that we can look into it. We will be able to help you out and make the plugins compatible.

        Reply
  11. jens1

    jens1

    January 21, 2019

    There is no “GDPR Cookie Consent > Script Blocker” in my GDPR Cookie Consent.

    Reply
    • Mark

      Mark

      January 21, 2019

      Hi,

      Make sure that you have deactivated and removed the basic/free version and installed the premium version zip. If issue still persists, reach us via support link above with a screenshot of your WordPress admin dashhboard( GDPR Cookie Consent menu)

      Reply
    • FRANCESCO MELOGLI

      FRANCESCO MELOGLI

      May 2, 2020

      Suggestion: uninstall the plugin pro and reinstall. With some other plugin such as “seed pro” coming soon the script blocker feature will not show anymore. So deactivate coming soon and you’ll see it again.

      Reply
  12. Adam

    November 6, 2018

    How can I change the color of the toggle buttons from teal to a different color?

    Reply
    • Mark

      Mark

      November 7, 2018

      Hi,

      Please refer the article to know how to customize the color of the button.

      Reply

Got any query? Please leave a comment or reach out to our support

Cancel reply

Your email address will not be published. Required fields are marked *

We develop awesome WordPress plugins & WooCommerce extensions to help build successful online businesses.

© 2023 WebToffee. All rights reserved.

Our plugins

  • GDPR Cookie Consent
  • PDF Invoices & Packings Slips
  • Product Import Export Plugin
  • User & Customer Import Export
  • Import Export Suite
  • Sequential Order Numbers
  • Smart Coupons for WooCommerce
  • URL Coupons for WooCommerce
  • PayPal Express Checkout
  • Stripe Payment Gateway
  • Subscriptions for Woocommerce
  • Product Catalog Sync for Facebook
  • PrintNode for PDF Invoices
  • Order, coupon, subscriptions for WooCommerce
  • WordPress Backup and Migration
View more +

Get Started

  • Plugins
  • Testimonials
  • Affiliates
  • We're hiring

Help & Support

  • Documentation
  • Documentation (Basic)
  • FAQ
  • Support

Company

  • Terms & Conditions
  • Privacy Policy
  • Refund policy
  • Support policy
  • License Activation

© 2023 WebToffee. All rights reserved.

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies. However you may visit Cookie Settings to provide a controlled consent.
Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of the basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website, to store user preferences and provide you with content and advertisements that are relevant. Such cookies will be stored on your browser but only upon procuring consent.

You will also have the option to opt-out of these cookies should you want to. But opting out of some of these cookies may have an effect on your browsing experience as per the descriptions elucidated against the respective categories below.

Necessary
Always Enabled
The cookies defined under this category are absolutely essential for the website to function. Hence they are loaded by default irrespective if user consent.
CookieDescription
__cfruidCloudflare sets this cookie to identify trusted web traffic.
__stripe_midStripe sets this cookie cookie to process payments.
__stripe_sidStripe sets this cookie cookie to process payments.
cookielawinfo-checkbox-advertisementSet by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Advertisement" category .
cookielawinfo-checkbox-analyticsSet by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Analytics" category .
cookielawinfo-checkbox-necessarySet by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Necessary" category .
cookielawinfo-checkbox-preferencesThis cookie is set by the GDPR Cookie Consent plugin to check if the user has given consent to use cookies under the "Preferences" category.
CookieLawInfoConsentRecords the default button state of the corresponding category & the status of CCPA. It works only in coordination with the primary cookie.
PHPSESSIDThis cookie is native to PHP applications. The cookie is used to store and identify a users' unique session ID for the purpose of managing user sessions on the website. The cookie is a session cookie and is deleted when all the browser windows are closed.
viewed_cookie_policyThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not a user has consented to the use of cookies. It does not store any personal data.
Analytics
Analytics cookies help us understand how our visitors interact with the website. It helps us understand the number of visitors, where the visitors are coming from, and the pages they navigate. The cookies collect this data and are reported anonymously.
CookieDescription
_gaThis cookie is installed by Google Analytics. The cookie is used to calculate visitor, session, campaign data and keep track of site usage for the site's analytics report. The cookies store information anonymously and assigns a randomly generated number to identify unique visitors.
_ga_BQH8MSKD4MThis cookie is installed by Google Analytics.
_gat_gtagIdentification code of website for tracking visits.
_gidThis cookie is installed by Google Analytics. The cookie is used to store information on how visitors use a website and helps in creating an analytics report of how the website is doing. The data collected including the number visitors, the source where they have come from, and the pages visited in an anonymous form.
_hjAbsoluteSessionInProgressHotjar sets this cookie to detect the first pageview session of a user. This is a True/False flag set by the cookie.
_hjFirstSeenHotjar sets this cookie to identify a new user’s first session. It stores a true/false value, indicating whether it was the first time Hotjar saw this user.
_hjidHotjar cookie. This cookie is set when the customer first lands on a page with the Hotjar script. It is used to persist the random user ID, unique to that site on the browser. This ensures that behavior in subsequent visits to the same site will be attributed to the same user ID.
_hjIncludedInPageviewSampleHotjar sets this cookie to know whether a user is included in the data sampling defined by the site's pageview limit.
_hjIncludedInSampleThis cookie is set to let Hotjar know whether that visitor is included in the sample which is used to generate heatmaps, funnels, recordings, etc.
_hjIncludedInSessionSampleHotjar sets this cookie to know whether a user is included in the data sampling defined by the site's daily session limit.
_hjTLDTestTo determine the most generic cookie path that has to be used instead of the page hostname, Hotjar sets the _hjTLDTest cookie to store different URL substring alternatives until it fails.
CONSENTYouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data.
has_recent_activityThis cookie is used to signal to the code repository website if the user has browsed other website resources during the current session.
tk_aiGathers information for our own first-party analytics tool about how our services are used. A collection of internal metrics for user activity and is used to improve user experience.
tk_lrThis cookie is set by the JetPack plugin on sites using WooCommerce. This is a referral cookie used for analyzing referrer behavior for Jetpack.
tk_orThis cookie is set by the JetPack plugin on sites using WooCommerce. This is a referral cookie used for analyzing referrer behavior for Jetpack.
tk_qsGathers information for our own first-party analytics tool about how our services are used. A collection of internal metrics for user activity and is used to improve user experience.
tk_r3dThe cookie is installed by JetPack. Used for the internal metrics for user activities to improve user experience.
Advertisement
Advertisement cookies help us provide our visitors with relevant ads and marketing campaigns.
CookieDescription
_fbpThis cookie is set by Facebook to deliver advertisements when they are on Facebook or on a digital platform powered by Facebook advertising after visiting this website.
frThe cookie is set by Facebook to show relevant advertisements to the users and measure and improve the advertisements. The cookie also tracks the behavior of the user across the web on sites that have Facebook Pixel or Facebook social plugin.
VISITOR_INFO1_LIVEA cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.
YSCYSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.
yt-remote-connected-devicesYouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
yt-remote-device-idYouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
Preferences
Preference cookies are used to store user preferences to provide them with content that is customized accordingly. This includes the language of the website or the location of the visitor.
CookieDescription
_gh_sessThis cookie is used to preserve users' states across page requests.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
CookieDurationDescription
_hjSession_137657130 minutesNo description
_hjSessionUser_13765711 yearNo description
_octo1 yearNo description available.
_zendesk_authenticatedpastNo description
_zendesk_sessionsessionNo description available.
_zendesk_shared_sessionsessionNo description available.
edd_wp_session12 hoursNo description available.
logged_in1 yearNo description available.
m2 yearsNo description available.
Save & Accept