How to implement CookieHub on your website

CookieHub can be implemented in different ways depending on your site setup and preferred workflow. This article provides an overview of the available methods and when to use each one.


Important note

You should only use one implementation method on your website. Installing CookieHub multiple times will cause conflicts and incorrect behavior.


Choosing the right implementation method

CookieHub ensures that cookies and tracking scripts are not loaded until the user provides consent. You can achieve this by implementing CookieHub using one of the following methods:


1. HTML tag (manual implementation)

If you are not using Google Tag Manager or WordPress, you can insert the CookieHub JavaScript code directly into your website’s HTML.

  • Works with any CMS or custom-built site.
  • Paste the code in the <head> section for best results, especially if you are using automatic cookie blocking or Google Consent Mode.
  • If automatic cookie blocking is disabled, you must manually adjust third-party scripts using conditional HTML attributes.

Read the full manual implementation guide.


2. Google Tag Manager (recommended if using GTM)

If you manage scripts through Google Tag Manager, we recommend installing CookieHub using the CookieHub CMP template from the GTM Community Template Gallery.

  • Includes Google Consent Mode support by default.
  • Integrates seamlessly with your GTM workflow.
  • Allows region-based consent defaults and advanced consent configuration.

Read the GTM implementation guide.


3. WordPress plugin

If your site runs on WordPress, the easiest method is to use the CookieHub WordPress plugin.

  • Simplifies setup with a dedicated UI for configuration.
  • Supports automatic cookie blocking.
  • Allows easy management of third-party tags by category.

Read the WordPress plugin guide.