Array ( [0] => GDPR Cookie Consent [1] => CCPA [2] => Getting Started [3] => Changelog [4] => GDPR [5] => Add and Categorise Cookies [8] => Auto-block cookies with Script Blocker [13] => Create Privacy Policy Page [15] => Customize Cookie Notice [18] => Customize Settings Pop up [19] => Change Toggle button color [21] => Display Cookie List [22] => FAQ [23] => Getting Started [24] => Multilingual Support [25] => Overview [26] => Import Export Suite for WooCommerce [28] => Order / Coupon / Subscription Export Import Plugin for WooCommerce [29] => PayPal Express Checkout Payment Gateway for WooCommerce [30] => Changelog [31] => Getting Started [32] => Issue Refund [34] => Video Tutorial [35] => Print Invoice, Packing Slip, Delivery Note & Label for WooCommerce [36] => Address Label [39] => Changelog [41] => Credit Note [43] => Delivery Note [45] => Dispatch Label [47] => FAQ [48] => Invoice [49] => Adding meta data [50] => Customizations [51] => Email PDF Invoice [52] => FAQ [53] => Getting Started [54] => Invoice Number [55] => Multilingual Support [56] => Overview [57] => Packing Slip [58] => Customizations [59] => Getting Started [60] => Pick List [62] => Proforma Invoice [65] => Shipping Label [68] => Product Import Export Plugin for WooCommerce [69] => Smart Coupons for WooCommerce [70] => Abandoned Cart Discount [71] => Advanced Coupon Options [72] => Bulk Generate [73] => Changelog [76] => Getting Started [78] => Import Coupon [80] => Sales Countdown Timer [81] => SignUp Coupon [82] => Store Credit [84] => Volume/Quantity based coupon [85] => Stripe Payment Gateway for WooCommerce [86] => Alipay [87] => Apple Pay [88] => Changelog [89] => Compatibility with Subscription [90] => Getting Started [93] => SCA Ready [94] => Stripe Checkout [95] => Stripe Overview [96] => Stripe via Credit Card [97] => Troubleshoot [98] => Video Tutorial [99] => Subscriptions for WooCommerce [100] => Changelog [101] => Email Notifications [102] => FAQ [103] => Getting Started [104] => Manually Add or Modify Subscriptions [105] => Subscriptions Payment Gateway Guide [106] => URL Coupons for WooCommerce [107] => Changelog [108] => FAQ [109] => Getting Started [110] => Import URL Coupons [111] => QR Code Coupon [112] => WordPress Users & WooCommerce Customers Import Export )

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

The Ultimate WordPress Plugin for EU Cookie Law (GDPR) Compliance

Used by 800,000+ WooCommerce Stores

#1 in Customer Satisfaction

WebToffee Guarantee: Get Your Money Back if You Are Not Satisfied With The Product

Buy Now!

The GDPR Cookie Consent 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 a 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

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. This will take you to the Manage Script Blocking page in the plugin as shown in the screenshot below.

Manage Script Blocking

From this page, enable the toggle button for the corresponding scripts. This will enable automatic blocking of the scripts on the website.

By default, all the scripts in the script blocker are in an enabled state and these scripts are assigned with a predefined category “Non Necessary“. 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 should be assigned a category.

You may assign any of the predefined categories or create new categories from GDPR Cookie Consent > Cookie Categories. Below is the screenshot of the Script blocker page when they are assigned to different categories.

Categories assigned to scripts

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.

User end to block the categories of scripts

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 assign the categories to the script blocker page from the Manage Script Blocking page. You may add the predefined categories of the plugin or you may add create a new category.

The important thing to remember is that there should be a cookie assigned to the category as well for the category to appear in the Settings popup. Also, if there is no cookie assigned to the category in the script blocker, the scripts will not be rendered at all when clicked on the Accept button. For example, if you assign the category Analytics to the scripts of Google Analytics, you must have a corresponding cookie with the same category in the Cookie List. If there is no cookie created in such a manner, the said category will not appear in the front-end popup.

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 of 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.

The Ultimate WordPress Plugin for EU Cookie Law (GDPR) Compliance

Used by 800,000+ WooCommerce Stores

#1 in Customer Satisfaction

WebToffee Guarantee: Get Your Money Back if You Are Not Satisfied With The Product

Buy Now!

  • Was this article helpful ?
  • YesNo