Cookies

Make your trackers wait for consent

Contents
  1. What the change is
  2. The three categories
  3. Why it matters
  4. Where to paste it on Kajabi
  5. Google Tag Manager needs two locks
  6. Check the result
  7. Common questions

Most websites carry a handful of tracking tags: analytics, ad pixels, testing tools, popups and countdown timers. If they run the moment a page opens, they collect data before the visitor has made a cookie choice. This guide is for the marketing team that owns those tags. It explains the small change that makes each tag wait for consent, where to make it, and how to check it worked. Your tags keep working exactly as before for every visitor who allows them.

What the change is

A tracking tag is usually a <script>. Browsers run a script straight away. Adding two attributes tells the browser to leave it alone, and tells the Trust Center consent panel which kind of cookie it belongs to:

<!-- Before: runs as soon as the page opens -->
<script async src="https://example-tracker.com/tag.js"></script>

<!-- After: waits for the visitor's choice -->
<script type="text/plain" data-tc-consent="analytics" async src="https://example-tracker.com/tag.js"></script>

type="text/plain" means the browser treats the tag as text and does not run it. data-tc-consent names its category. When the visitor allows that category, the panel runs the tag in its original place and order. Everything else stays as it was: the address, async, defer, the id and any code written inside the tag. If the tag already has a type such as text/javascript, replace it. If it has type="module", keep that value in data-tc-type="module" and the panel restores it.

An embedded frame (an <iframe>, for example a video or booking widget) loads from its src address. Rename src to data-tc-src and add the category:

<!-- Before -->
<iframe src="https://www.youtube.com/embed/VIDEO_ID" width="560" height="315"></iframe>

<!-- After -->
<iframe data-tc-consent="functional" data-tc-src="https://www.youtube.com/embed/VIDEO_ID" width="560" height="315"></iframe>

The three categories

Each value matches a switch in the consent panel your visitors see.

ValuePanel switchUse it for
analyticsPerformance CookiesTools that measure visits and behaviour on your own site: Google Analytics, Microsoft Clarity, Hotjar, VWO, Funnelytics.
marketingMarketing CookiesAdvertising pixels and anything that tracks people for ads or across sites: Google Ads, Meta, Microsoft Advertising, TikTok, LinkedIn, Wicked Reports, OptinMonster. A Google Tag Manager container that holds any advertising tag is marketing too.
functionalFunctionality CookiesFeatures a visitor uses on the page: embedded videos, booking widgets, and offer countdowns such as Deadline Funnel.

If you are unsure, choose marketing: it is the safe choice. Only change a tag to analytics if it measures visits and nothing else.

Leave alone the scripts your site needs to work, such as forms, checkout and the website platform's own code. They are not trackers and should not wait.

Why it matters

  • The law where you have visitors. In the EU, the UK, Quebec and a few other places, analytics and advertising tags may only run after the visitor agrees. A tag that runs before the choice is a breach there even if the visitor later accepts, and it keeps running if they reject.
  • Your banner tells the truth. Your consent panel tells visitors they choose what gets switched on. A tag that ignores the choice makes that promise false, which is what regulators and complainants look for first.
  • Advertising accounts. Google and Meta require valid consent for visitors from Europe. See Setting up Google Analytics, Google Ads and Tag Manager with consent for Google's rules and how to keep your conversion tracking.
  • Nothing is lost where the law allows tracking. In places where tracking may start without asking, such as Australia, most of the United States, Canada outside Quebec and New Zealand, the panel shows a bar at the bottom of the page and runs the waiting tags straight away. Visitors there only lose a tag if they switch its category off.

Where to paste it on Kajabi

  1. In Kajabi, open Settings, then Site details, and find Page scripts. The field you want is Header Page Scripts.
  2. Copy everything in the field into a text file first. That copy is your way back if anything goes wrong.
  3. The first line in the field is the Trust Center line, ending in /consent/boot.js. Leave it where it is. It must stay above every other tag, because it is what holds the others back.
  4. Below that line, replace each tracking tag with its re-tagged version. The Trust Center fix list for your site gives you each one ready to paste. Paste each tag once: if the same tag appears twice, keep one copy.
  5. Save, then open your site in a private window to check pages still look and work as before.

Some tools let you connect them in Kajabi's own settings, for example a Facebook pixel ID or Google Analytics ID field, instead of pasting a tag. Those cannot be held for consent. Clear the built-in setting and paste the tool's tag into the Header Page Scripts, re-tagged, instead. Landing pages with their own theme can have their own header code: check each one.

On other website platforms the idea is the same: put the Trust Center line first in the site's head code, and re-tag every tracker below it.

Google Tag Manager needs two locks

Tag Manager is a container that loads other tags, so holding the container script is only the first step. Hold the container itself, then set consent checks on each tag inside it. The steps are in Re-tagging common trackers: before and after examples, with a ready example for every common tool.

Check the result

Trust Center scans your website every week and lists every tag that still runs before a visitor chooses, with the cookies it set and the re-tagged version to paste. Once you have saved your changes, ask us for a fresh scan, or wait for the next weekly one. A clean result says every tracker tag found waits for consent.

You can also check by hand:

  1. Open your site in a private window. From a location that asks first (the UK or the EU, for example through a VPN) the consent panel appears before anything else.
  2. Open your browser's developer tools, choose the Application or Storage tab, and look at cookies. Before you choose, you should see no analytics or advertising cookies such as _ga, _fbp or _gcl_au.
  3. Choose I Accept Cookies. The tags run and their cookies appear.
  4. In a fresh private window, choose I Do Not Accept Cookies. Nothing loads, and the page works.

Common questions

  • Will we lose data? Only from visitors who say no, which is the point. Where the law lets tracking start on, visitors see a bar and tags run as before.
  • Does order matter? Yes. The panel runs waiting tags in the order they appear, and waits for each tag without async or defer to load before the next, so a tag that depends on another still works.
  • What happens when someone changes their mind? Switching a category off deletes the common cookies for it and reloads the page, so its tags stop.
  • Can we test before going live? Make the change on one landing page first, check it, then copy the same edits into the site-wide Header Page Scripts.

See what your own website shows

The free scan checks your site for cookies set before consent, missing policies and basic security settings, and gives you a score in under a minute.

Run the free scan →