Automatic Cookie Blocking
CookieHub offers an optional feature to automatically block cookies set by commonly used services, making it easier to implement CookieHub to your website.
Please note that when using Google Tag Manager as the implementation method, you should not use automatic cookie blocking.
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 and 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
- Microsoft Clarity
- TikTok Analytics
- AddThis
- ShareThis
- AddToAny
- Snowplow analytics
- Tawk.to
- Inspectlet
- Bing Ads / Microsoft Ads
How to enable the Automatic Cookie Blocker?
If you are already using CookieHub without the automatic cookie blocking feature, you'll need to update the CookieHub implementation code and make sure it's loaded in the <head> of your website before any tracking scripts.
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 dash.cookiehub.com
2. Click the domain that you want to configure
3. Make sure CookieHub is updated to the latest version by clicking the update button as shown below:
4. Click the Settings tab and activate the Automatic cookie blocking option
5. Click the Implementation tab and select the method you are currently using to implement CookieHub.
- Google Tag Manager: Automatic cookie blocking should not be used when CookieHub is integrated using Google Tag Manager.
- Wordpress plugin: You will have to enable automatic cookie blocking from the CookieHub plugin settings section.
- Manually insert the code: Replace your current CookieHub code with the new code shown.
Sample of the code manually implemented in a simple html file:
Great job! CookieHub with automatic cookie blocking is now implemented to your web site.