Skip to content

Welcome

Developer guides for the OptinStack consent runtime, JavaScript API, and platform integrations.

OptinStack is a Consent Management Platform (CMP) runtime for websites. It renders a consent banner and preferences dialog inside a Shadow DOM, manages visitor consent state, blocks and unblocks third-party scripts and iframes, and records consent updates for reporting.

This site documents the browser runtime, JavaScript API, consent events, and integration patterns for developers adding OptinStack to a site. Product setup, privacy and consent guidance, and platform walkthroughs live on optinstack.com.

Key topics

Quick start

Add the OptinStack two-tag install to your page. Bootstrap loads project configuration; the runtime tag loads the consent kernel:

<script src="https://api.optinstack.com/v1/cdn/bootstrap.js?projectId={projectId}"></script>
<script src="https://api.optinstack.com/v1/js/runtime/stable/optinstack.js" data-optinstack-site="{projectId}"></script>

Once loaded, the API is available at window.OptinStack:

await window.OptinStack.ready;
console.log(window.OptinStack.choices);

Replace {projectId} with your project ID from the dashboard. See Getting started for installation details.

Was this helpful?