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, compliance guides, and platform walkthroughs live on optinstack.com.

Key topics

Quick start

Add the OptinStack script to your page. It loads the consent runtime, which fetches your project configuration and renders the banner:

<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?