Skip to content

Documentation

Script Centre

Script Centre

Pro Plan

Last updated Mar 24, 2026

Pro Plan Feature

This feature is available on the Pro plan and above. View pricing →

The Script Centre lets you manage third-party scripts that should only load after visitors consent to specific cookie categories. Instead of embedding scripts directly in your HTML and hoping they respect consent, you can add them to the Script Centre and let Kukie.io handle the loading logic.

What Is the Script Centre

The Script Centre is a managed script injection system. You add scripts (such as analytics trackers, marketing pixels, or chat widgets), assign each to a cookie category, and choose where in the DOM it should be injected. When a visitor gives consent for that category, the script loads automatically.

Adding Managed Scripts

Navigate to your site's Cookies & Scripts page and open the Categories & Cookies tab. Click Add Script and fill in:

  • Name - a descriptive name for the script (e.g. "Facebook Pixel").
  • Script code - the HTML/JavaScript snippet to inject.
  • Category - the cookie category that must be accepted before this script loads.
  • Position - where to inject the script: head start, head end, body start, or body end.

Each managed script is tied to a cookie category. In the opt-in consent model, the script only loads after the visitor accepts that specific category. In opt-out mode, the script loads immediately and is removed if the visitor later opts out.

Auto-Detect Services from Last Scan

The Script Centre can auto-detect third-party services found during your last cookie scan. Click Auto-detect from last scan to see a list of detected services (up to 13 common services including Google Analytics, Facebook Pixel, Hotjar, and more). Select the ones you want to manage and they will be added with the correct category assignment.

Script Sanitisation

All managed scripts are sanitised on the server side before being served to visitors. Potentially dangerous patterns are stripped to prevent XSS attacks. This ensures that even if a script snippet contains unexpected code, it cannot compromise your visitors' security.

Tip: Use the Script Centre instead of manually embedding tracking scripts in your site's HTML. This ensures all scripts respect consent choices and gives you a central place to manage them.

Was this helpful?