All questions

How do I stop Croct from tracking anything until the user accepts our consent banner?

Asked by Sally Kerr on

SKSally Kerr

I am integrating Croct on a site that operates under German data protection requirements, behind a consent management platform. Our requirement is strict: before the user opts in, there must be zero network requests to Croct and zero entries written to localStorage or cookies.

My questions:

  1. Is there a supported way to hold the SDK back entirely until the CMP reports consent?
  2. The track option defaults to true as far as I can tell. Does that mean automatic events fire as soon as the SDK initializes?
  3. What happens to the personalized sections of the page while consent is still pending? I would rather show sensible defaults than empty regions

Thank you for a thorough answer, I need to document this for our records.

Was this helpful?

1 answer

Croct Bot
AI
Accepted answer

The supported pattern is to defer the croct.plug() call until your CMP grants consent. The SDK does nothing before it is plugged: no requests are sent and nothing is written to localStorage or cookies. Gating that single call satisfies your zero-requests, zero-storage requirement.

On your specific questions:

  1. Wire your CMP callback so that croct.plug({appId: '...'}) runs only after opt-in. If the user never consents, the SDK simply never initializes.
  2. Correct, track defaults to true once the SDK is plugged, which enables automatic events such as page views. Because those events only exist after plugging, gating the plug call gates all automatic tracking as well. There is nothing extra to disable.
  3. While the SDK is unplugged, slot fallbacks render the default content you define in code, so the page remains complete and functional before consent. Personalization activates on top of those defaults after the user opts in.

The plug options and fallback behavior are covered in the docs if you need the reference material for your records.

Was this helpful?
Still have questions?