Skip to content
Developer & Platform

Build on it

Beta

Ask the runtime, instead of guessing.

A small API over the consent state: what is allowed now, a callback when that changes, a way to open the preference centre, and a helper to run code only once a category is permitted.

JavaScript SDK

  • Current state
  • Change subscription
  • Open preference centre
  • Run-when-allowed helper

How it helps

What you get with JavaScript SDK

1

Deterministic for your own code

Gating your analytics call behind a state check beats hoping an interceptor caught it.

2

Events, not polling

Subscribe to changes so a withdrawal reaches your code immediately.

3

Frozen when it is ready

The public surface is published when it is stable. A conceptual API in marketing copy that then changes is a broken promise in someone's codebase.

Know what runs before you ask visitors to trust it.

Start with a scan of what your website loads today. The list is usually longer than the team expects, and that is the useful part.

No code to install for a scan Public pages only DotCensus runs on DotCensus