Browser
Drive browser destination consent (Meta, Pinterest, TikTok, Snapchat, etc.) from your cookie banner or CMP. Set state once with the consent API and Seeka enforces it across every Seeka-managed destination on the page.
Before you start
These snippets gate destinations only when the session's effective data control mode is implicit or explicit - from the brand's configured default, a session override, or both. With a disabled brand default and no override, the consent API records state but every destination still loads.
How the browser SDK enforces consent
When the Seeka SDK boots, each destination plugin (Meta Pixel, Pinterest Tag, TikTok Pixel, etc.) declares the IAB purposes it requires. The privacy SDK reads your current state and decides whether each destination is enabled: true or enabled: false before its script tag is injected. A disabled destination is not initialised, so no third-party network requests fire and no third-party cookies are set.
When you later call setPrivacyState(...):
- New grants enable previously-blocked destinations - the SDK injects their script tags and initialises them at that point.
- New denials disable previously-loaded destinations - the SDK stops sending them events. (Note: cookies already dropped before consent was revoked are not retroactively cleared - the SDK can only prevent new drops.)
- Unchanged state is a no-op.
Recommended integration pattern
- Load the Seeka SDK on page load. Do not gate the Seeka init script itself behind the cookie banner.
- As soon as your cookie banner has a decision (acceptance, rejection, restored preference), call
seeka.privacy.setPrivacyState(...)with the user's consent. - If the user changes their mind, call
setPrivacyStateagain with the new state. The SDK will toggle destinations accordingly.
This pattern keeps the SDK active from the moment the user lands, while still gating third-party ad destinations on consent.
Calling consent before the SDK has loaded
window.Converge.privacy exists as a queueing stub from SDK v1.12.0, so early calls are safe and are applied during initialisation. On older versions - or a page still running an older inline install snippet - it is undefined until the script loads and calling it throws. Guard early calls behind the ready event, which is safe on every version:
if (window.Converge && window.Converge.privacy) {
window.Converge.privacy.setPrivacyState(state);
} else {
window.addEventListener('converge.sdk.ready', () => window.Converge.privacy.setPrivacyState(state), { once: true });
}Session-scoped data control override for embedding vendors
If you embed Seeka on behalf of a brand - for example a ticketing or events platform running Seeka for many organisers - you can tighten the data control mode for a single browser session without changing the brand's configured mode. This is useful when one page falls under a stricter jurisdiction than the brand's default, e.g. an EU event for a brand whose Seeka mode is disabled.
The override is session-scoped (this page load only), tightening-only (it can move the brand toward stricter consent - disabled > implicit > explicit - but never weaken it), and persists nothing against the brand. It applies to every Seeka instance on the page.
Option 1 - pre-init global
Set window.Seeka.privacy.mode before the Seeka script loads:
<script>
window.Seeka = window.Seeka || {};
window.Seeka.privacy = { mode: 'explicit' };
</script>
<!-- then load / install Seeka as usual -->Option 2 - SeekaInstall option
Pass privacyOverride to SeekaInstall. It applies the same override before the brand script loads:
SeekaInstall({
instances: [{ org: 'org-id', id: 'instance-id', key: 'public-key' }],
privacyOverride: { mode: 'explicit' },
});mode accepts 'disabled', 'implicit' or 'explicit' (case-insensitive). An unrecognised value is ignored and the brand's configured mode is used. A warning is logged via the SDK's debug logger - note it only reaches the console when debug logging is enabled (warnings show at the default minimum level; appending ?debugLevel=verbose to the page URL is the quickest way to switch logging on); a production install with debug logging disabled will not show it.
If both entry points are used on one page, they merge tightening-only as well: a weaker privacyOverride never downgrades a stricter mode already set on window.Seeka.privacy.
The override applies page-wide, and from SDK v1.12.0 it is also forwarded into Seeka-hosted dynamic iframe instances, so vendor scripts contained inside those frames honour it too (each frame instance still tightens against its own brand's configured mode).
Important - an
explicitoverride needs a consent mechanism. Setting the override toexplicitenforces no tracking without consent for the session, including Seeka's own first-party conversion and identity collection. If you flip a session toexplicitbut never capture consent viaseeka.privacy.setPrivacyState(...), Seeka receives no data at all for that session, by design. The mode flip alone does not make a session "compliant" - it silences it until consent is granted. Animplicitoverride (opt-out) keeps data flowing unless the visitor explicitly denies a purpose.
Framework-specific snippets
Multi-instance installs
If your install loads more than one converge instance per page, the page global (window.Converge) is a scoped wrapper that exposes privacy.setPrivacyState and privacy.setConsentManager, fanning out across every installed instance. Use the global your install snippet already created - do not construct a second SDK:
await window.Converge.privacy.setPrivacyState({
grantedIabPurposeIds: [7],
deniedIabPurposeIds: [],
});
// Applied to every instance; resolves after each instance has settled.privacy.isPluginLoadable and privacy.isIabPurposesGranted throw on the scoped wrapper - those are per-instance queries. From SDK v1.12.0 the wrapper's privacy.mode reports the strictest mode any installed instance is enforcing, and privacy.state the last consent set through the wrapper (older versions report fixed placeholders). Reach in via window.Converge.instances[scopeKey].privacy if you need to inspect a specific brand.
Troubleshooting
See Privacy SDK troubleshooting for a checklist when destinations fire despite the consent API being called.