Custom CMP

Embed
Preview of the card
<a href="https://forumulate.com/guides/cookies-consent-custom"><img src="https://forumulate.com/guides/_api/public/orgs/046a9bc0-d530-43ae-9bae-af7945008cda/spaces/36aa4df0-1e95-4cef-8ae9-795169441345/pages/a5649f73-d5f1-4ef9-8261-5bc4691e8d2d/social-card.svg?v=3e7ae33eec8b" alt="Custom CMP" width="600" height="315"></a>

If your vendor isn't one of the natives, use provider: "custom". There are two modes, chosen by the mode field inside custom.

Mode 1 — loader: your vendor's script

Point us at the vendor's loader URL and we'll inject it on your reader pages, exactly like a native provider.

{
  "provider": "custom",
  "custom": {
    "mode": "loader",
    "loaderUrl": "https://cdn.acme.com/cmp.js",
    "verifiedHosts": ["cdn.acme.com"]
  }
}

Two rules are enforced when you save:

  • https: only. A plaintext loader URL is rejected.

  • The loader's host must be one of your organization's verified domains. You supply your verified hosts in verifiedHosts, and we confirm the loader's host is among them.

The verified-host rule is the whole point of custom-loader safety. Your reader pages are served from a shared *.forumulate.com origin (until you bring your own domain). Allowing an arbitrary third-party script there would let any tenant inject script into that origin. So a raw loader is allowed only from a host you have already proven you own — self-host the vendor's loader on your domain, verify that domain, and reference it here. The reader CSP is then pinned to that one origin.

If you can't self-host the loader, use adapter-API mode instead — it injects no script at all.

Mode 2 — adapterApi: no script on our origin

Some CMPs expose a preferences UI and a state endpoint instead of a page script. In this mode Forumulate opens your preferences URL and reads consent state from your endpoint — nothing is injected onto the reader origin, so there's no script-source to allow.

{
  "provider": "custom",
  "custom": {
    "mode": "adapterApi",
    "settingsUrl": "https://privacy.acme.com/preferences",
    "stateUrl": "https://privacy.acme.com/consent-state"
  }
}
  • settingsUrl (required) — where a reader manages their choices. Must be https:.

  • stateUrl (optional) — where Forumulate reads current consent state. Must be https: when present.

Which mode?

loader

adapterApi

Vendor delivers

a page script

a preferences UI + API

Runs script on your reader origin

yes (from a verified host)

no

Requires a verified domain

yes

no

Best when

you can self-host the loader

you can't, or prefer zero third-party script

Both modes are provider-agnostic — the same webhook and API apply.

The Forumulate teamUpdated