Skip to content

Documentation

Install the Cookie Banner on Your Website

Install the Cookie Banner on Your Website

Last updated Mar 24, 2026

The Kukie.io cookie consent banner is loaded by a single JavaScript file. There are three ways to add it to your website: a manual script tag, Google Tag Manager, or the WordPress plugin. Choose whichever method suits your workflow best.

Using WordPress? Install the Kukie WordPress plugin for automatic banner injection - no code needed. See the WordPress installation guide.

<!DOCTYPE html> <html> <head> <script src="https://app.kukie.io/c.js" data-site-key="..." async></script> </head> <body> ... </body>

Method 1: Manual Embed (Recommended)

This is the simplest and most reliable method. Copy the script tag from your site's overview page and paste it into the <head> of every page on your website.

<script src="https://app.kukie.io/c.js" data-site-key="YOUR_SITE_KEY" async></script>

Replace YOUR_SITE_KEY with the site key shown on your dashboard. The async attribute ensures the script does not block page rendering.

Tip: Place the script tag as high in the <head> as possible so the banner loads before other third-party scripts. For maximum blocking effectiveness with auto-block enabled, consider removing the async attribute.

Single-Page Applications & Frameworks

If your site is built with React, Vue, Next.js, Nuxt, or another SPA framework, add the script tag to your root HTML file (usually index.html or the equivalent layout template). The banner script is framework-agnostic and does not need any npm package.

Method 2: Google Tag Manager

If you manage all of your third-party scripts through GTM, you can add the Kukie.io banner as a Custom HTML tag.

Step 1: Create a new tag

In your GTM workspace, click Tags → New. Choose Custom HTML as the tag type and paste the same script tag shown above.

Step 2: Set the trigger

Set the trigger to Consent Initialization - All Pages. This special trigger fires before any other tags, ensuring the consent banner is the first thing that runs.

Step 3: Publish

Save the tag and publish your GTM container. The banner will now appear on every page managed by GTM.

Important: If you are also using Google Consent Mode v2, make sure the GCM integration is enabled in your Kukie.io banner settings. The banner fires gtag('consent', 'default', ...) automatically before GTM loads. See Integrations for details.

Method 3: WordPress Plugin

For WordPress sites, the dedicated Kukie.io WordPress plugin handles installation automatically. Install the plugin from your WordPress admin panel, enter your API key, and the banner script is injected into every page. See the WordPress Plugin category for full setup instructions.

Platform-Specific Guides

For step-by-step instructions tailored to your platform:

CMS & Website Builders

eCommerce

JavaScript Frameworks

Marketing & Landing Page Platforms

Static & Other

Verifying Your Installation

After adding the script, visit your website and confirm that the cookie banner appears. Then return to the Kukie.io dashboard and click the Verify button on your site overview page. Kukie.io will check your domain for the presence of the script tag and site key. For more details, see Verify Your Installation.

Troubleshooting

  • Check that the domain you registered in Kukie.io exactly matches your website hostname (without www.).
  • Open your browser developer tools and look for network requests to app.kukie.io/api/v1/config/ - a 200 response means the script is loading correctly.
  • Ensure no ad blocker or privacy extension is blocking the script. Some blockers target known consent management scripts.

The banner compares the current page hostname against the domain registered in your Kukie.io dashboard. If they do not match, the banner will not render. Make sure the domain field matches exactly.

Tip: Add ?kukie_debug=1 to any page URL to see domain matching output in the browser console.

Was this helpful?