Automatic Cookie Blocking

CookieHub offers an optional feature to block cookies for domains with premium subscriptions, which automatically blocks common services that set cookies until the user has consented making it easier to implement CookieHub to your website.

How does it work?

CookieHub automatically detects javascripts used by common services that set tracking cookies and adjusts the tags to delay the load, this is done before any javascript is rendered. Once the web page is ready to be rendered, the general CookieHub code will loaded which checks if the user has already consented or if we need to show the initial cookie dialog to give the user a choice. If the user has consented or when he consents, the delayed scripts are loaded normally.

If you only use services that are supported by the automatic cookie blocker on your site, you won't have to do any further changes to implement CookieHub correctly. If however you are using other services that are currently not supported, you will have to either use Google Tag Manager or the delay inline javascripts method for the remaining services. Click here for further information about manual implementation.

What services/tags are automatically blocked?

We are frequently deploying updates to the cookie blocker and adding additional services. Below is a list of the services currently supported:

  • Google Analytics (both gtag and analytics.js methods, including GA4)
  • Google Ads (remarketing, conversion tracking and display ads, previously Google AdSense)
  • Google Maps (both embedded and api)
  • YouTube embedded videos
  • Facebook Pixel
  • Crazyegg
  • Hotjar
  • Leadfeeder
  • Linkedin Insights

How to enable the Automatic Cookie Blocker?

To activate the automatic cookie blocker, you need to use a different variation of the CookieHub implementation code. This is because in order to stop 3rd party services from loading, the cookie blocking javascript must run before all other scripts loaded on your site.

Follow these steps to activate automatic cookie blocking:

1. Log in to your CookieHub account on

2. Click the domain that you want to configure

3. The automatic cooking blocking was introduced in version 2.3.5. If you are currently using earlier version, you need to update using the button as shown below

4. Click the Settings tab and activate the Automatic cookie blocking option

5. Go back to the Overview tab to get the updated integration code. Paste the code to your website above all other scripts in the <head> section. If you already have a different CookieHub implementation code on your web site, please remove it to avoid conflicts.

It's very important to place it above all other scripts in order for the automatic cookie blocking functionality to work.

Sample of the code implemented in a simple html file:

Great job! CookieHub with automatic cookie blocking is now implemented to your web site.

Still need help? Contact Us Contact Us