Manual implementation guide

If you are currently using Google Tag Manager or Wordpress, we recommend following these instructions instead:

Implementing the CookieHub code to your web site

Follow these steps to manually insert the CookieHub code to your web site's html code:

  1. Log in to your account on
  2. Click the domain if you have already created it, if not you need to click the Add button and create it in your account.
  3. Click the Implementation tab and then select Manually insert the code:

  4. In the next step, you'll see html/javascript code that needs to be copied to your web site's source. For domains with active premium subscriptions, there are two different codes, one for production that you should use for websites that are currently in production and another for development.

    The production code will only work on the domain name that you created in the CookieHub dashboard while the development code will work on any domain in order to work on development and staging URLs but it will show a watermark and should never be used in production environments.

    Additionally, the code may vary depending on the features selecting in the Settings tab. The code for automatic cookie blocking looks totally different from the standard implementation code and when Google Consent mode (GCM) is enabled, the additional code required by GCM is integrated to the CookieHub code.

  5. Paste the code to your web site either at the top of the <head> tag (when automatic cookie blocking and/or Google Consent mode is enabled) or in the <head> or <body> tags when the standard CookieHub code is used. Where you place this code depends on the content management system (CMS) used for your web site but most CMS allow you to edit the template or add code to the <head> tag

When you have implemented the CookieHub code to your web site, the cookie consent dialog will be shown and the user will be able to allow or deny cookie categories but in order to respect the users choices you need to adjust tags used for 3rd party services setting cookies and tracking the user or collecting personal information. These services may include web analytics, ad targeting and remarketing services, external form components collecting user data, embedded components including embedded videos and sharing buttons.

CookieHub can do this automatically for you for the most commonly used services when the automatic cookie blocker is enabled but for other services you may need to manually adjust the tags. This is done using html attributes to delay the loading of the script or content and telling CookieHub which cookie category the tag belongs to.

Further details can be found in this article:

Adjust script and iframe tags to delay load

Still need help? Contact Us Contact Us