Custom CMP
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 behttps:.stateUrl(optional) — where Forumulate reads current consent state. Must behttps:when present.
Which mode?
|
| |
|---|---|---|
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.