New aggregated insights just released Learn more →

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

Usually no integration needed; we detect consent automatically

Written by Trace Team Updated 10-03-26

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?.

Still need help?

Contact our support team and we will get back to you as soon as we can.

support@usetrace.io