trace.
Log in
Start for free No card required

How do I integrate cookie consent (CMP) with Trace?

Updated 30 September 2026

In most cases you don’t need to do anything. Add the Trace snippet to your site and use your usual cookie banner or CMP. Trace automatically reads analytics consent from:

  • Cookiebot
  • OneTrust
  • IAB TCF (CookieHub, and other TCF-compatible CMPs)
  • CookieYes

No extra code or configuration is required. When a visitor accepts or declines cookies, we use that same choice for tracking.

Using a different CMP?

If your consent tool isn’t in the list above, wire it to Trace by setting window.traceConsent when the user makes a choice:

  • When they accept analytics cookies: window.traceConsent = true
  • When they decline: window.traceConsent = false

Call this from your CMP’s callback or when the banner is submitted (before or after the Trace script loads, we read the value each time we send an event). For more detail, see How do consent flags work in Trace?.

Was this useful?