CookieHub loads multiple times on your website

Problem

Your CookieHub consent banner looks normal, but certain actions don’t work correctly. The most common issue is that the banner does not close when users click Accept all or Deny all.


Why this happens

This occurs when the CookieHub script runs more than once in the background, even though the dialog only appears once visually. Common causes include:

  • The script is added in both your site’s HTML and in Google Tag Manager (GTM).
  • The script is added via GTM and through a CMS plugin (e.g., WordPress).
  • GTM contains multiple CookieHub tags or the tag has more than one trigger firing on the same page.

Impact

Multiple script executions can cause:

  • The banner not closing after Accept/Deny clicks.
  • Incorrect consent handling.
  • Google Consent Mode failing.
  • Unpredictable script blocking or unblocking.

How to fix it

  1. Check all installation points
    • Inspect your HTML: Open the page source and search for cookiehub.
    • Review GTM: Check for multiple tags referencing CookieHub and confirm the CookieHub tag only has one trigger (usually “All Pages”).
    • CMS plugins: If you use a plugin (e.g., WordPress), confirm whether it injects the script automatically.


  2. Remove duplicate implementations
    • Keep only one installation method (recommended: GTM or a CMS plugin).

      If using GTM:

      • Ensure there is only one CookieHub tag.
      • Ensure it only has a single trigger.

        Clear cache and test


  3. Clear site and browser cache (important if you use caching plugins).

    Refresh your site and verify:

      • The banner appears once.
      • It closes correctly after Accept/Deny.