SDK · v2.0
Drop-in consent SDK
Add a fully-fledged consent banner, preference centre and DSAR intake to any website with a few lines of code. TypeScript-first, framework-agnostic, ~12 KB gzipped.
Quickstart
1. Install the package for your stack:
# vanilla
npm i @dpdpasuite/sdk
# React
npm i @dpdpasuite/sdk @dpdpasuite/react
# Next.js (App Router)
npm i @dpdpasuite/sdk @dpdpasuite/react @dpdpasuite/next
# Vue 3
npm i @dpdpasuite/sdk @dpdpasuite/vue2. Initialise with your tenant slug. The SDK will fetch your purposes, branding and copy from the public config endpoint and render a banner on first visit.
import { createConsent } from "@dpdpasuite/sdk";
const consent = createConsent({ tenant: "acme" });
await consent.init();3. That's it. Gate trackers behind purposes:
if (consent.getConsent("analytics")) {
loadAnalytics();
}Need a turn-key compliance setup?
Deploy a Fintech, Healthcare, E-commerce or SaaS template in one click — consent purposes, notices and DSAR workflows are pre-configured. Then point the SDK at your tenant.
Browse industry templates →