Integrate consent in minutes
A drop-in snippet for the web, native SDKs everywhere your users are, and the standard consent APIs you already know. Everything you need to evaluate and integrate Cookie Panda — no account required.
On this page: Quickstart · Install · Configuration · Reopening the banner · Desktop, mobile & custom banners · API & MCP · Frameworks & signals · Consent API · Data subject requests
Quickstart
Add one async script tag to your site and Cookie Panda handles consent end to end. Drop it in your <head> ahead of any analytics or advertising tags so trackers stay blocked until the visitor decides.
<!-- Add to your <head>, before any tracking scripts -->
<script
src="https://sdk.cookiepanda.app/cookiepanda.min.js"
data-cp-token="cp_xxx"
data-cp-api="https://edge.cookiepanda.app"
async
></script>What happens automatically
Geo-detects the visitor and applies the right jurisdiction (GDPR, CCPA/CPRA, LGPD and more).
Renders your consent banner using the copy, colours and layout configured in the dashboard.
Blocks cookies and tracking scripts before consent, then unblocks the moment a visitor opts in.
Emits Google Consent Mode v2 signals and the IAB TC and GPP strings as choices change.
Install
Cookie Panda ships native SDKs for every surface, all sharing one consent record. Pick your platform below, then follow the platform guide for the full setup.
Web — script tag (guide)
<script
src="https://sdk.cookiepanda.app/cookiepanda.min.js"
data-cp-token="cp_xxx"
data-cp-api="https://edge.cookiepanda.app"
async
></script>iOS — Swift Package Manager (guide)
// Package.swift
dependencies: [
.package(
url: "https://github.com/cookiepanda/cookiepanda-ios.git",
from: "1.0.0"
)
]Android — Gradle (guide)
// build.gradle.kts (app)
dependencies {
implementation("app.cookiepanda:sdk:1.0.0")
}Flutter — pub (guide)
flutter pub add cookie_pandaConnected TV
Native consent SDKs and TV-optimised banners for Apple tvOS, Android TV, Roku and Amazon Fire TV — remote-friendly and IFA-aware, sharing the same consent record as web and mobile. Guides: tvOS · Android TV · Roku
Configuration
The web loader needs one data attribute; a few optional ones override dashboard settings per page. Everything else — banner copy, colours, layout and theme — is managed visually in the dashboard, so you rarely need to touch code again after install.
data-cp-token(required) — your public site token (cp_…). Identifies the site so the right configuration loads. Safe to expose in client-side code.data-cp-api(optional) — consent edge endpoint. Defaults tohttps://edge.cookiepanda.app; override only for a custom domain.data-cp-launcher(optional) —icon,autoornone: overrides the dashboard's reopen-button setting for this page. See Reopening the banner.data-cp-theme(optional) —system,site,lightordark: overrides the dashboard's colour scheme.data-cp-locale(optional) — force a language instead of the visitor's browser language.
Banner text, languages, colours, layout and light / dark / system theme are all edited in the dashboard and served to the SDK at runtime — no redeploy needed when you tweak the banner.
Reopening the banner
Visitors must be able to change their mind as easily as they decided. After a choice, the dashboard's Reopen button setting decides what stays on the page:
Floating icon (default) — a small round button in a corner of every page. Pick bottom left or right, and optionally show a "Cookie settings" label.
Auto — the floating icon appears only on pages that have no Cookie settings link.
Link only — no icon at all. Your own link reopens the banner.
Add a reopen link anywhere — no JavaScript needed, and links your CMS adds after the page loads work too:
<a href="#cookie-settings">Cookie settings</a>
<a href="#cookie-settings" data-cp-open="preferences">Manage cookies</a>
<a href="#privacy-choices" data-cp-open="privacy-choices">Your privacy choices</a>WordPress, Shopify, Webflow, Wix, Squarespace, Framer: in your footer menu, add a custom link with the label Cookie settings and the URL #cookie-settings. A page opened with #cookie-settings in its address opens the banner as well.
From your own code, use the command queue — it works before and after the SDK has loaded:
window.cookiepanda = window.cookiepanda || [];
cookiepanda.push(["show"]); // reopen the banner
cookiepanda.push(["showPreferences"]); // open the per-purpose choices
cookiepanda.push(["on", "consent", (e) => console.log(e.categories)]);Events: ready, show, hide, consent and change. Each is also dispatched on document as cookiepanda:<event> for Google Tag Manager:
document.addEventListener("cookiepanda:consent", (e) => {
console.log(e.detail.categories); // { necessary, analytics, advertising, preferences }
});API & MCP
Everything in the Banner Designer can also be set from code. Create an API key in Settings → API keys (pick Banner design only to limit what it can touch), then send it as Authorization: Bearer cp_apikey_….
# Change just what you need — the same checks as the Designer run on every save
curl -X PATCH https://dashboard.cookiepanda.app/api/v1/websites/123/banner \
-H "Authorization: Bearer $CP_KEY" -H "Content-Type: application/json" \
-d '{"devices": {"mobile": {"layout": "sheet", "buttons": "stacked"}},
"launcher": {"mode": "auto", "position": "bottom-right"}}'
# Add ?dry_run=true to see the result and any compliance findings without savingConnect an AI assistant. Cookie Panda runs a remote MCP server, so Claude, Cursor and other MCP clients can design and update banners for you — apply templates, set phone and desktop designs, configure the reopen button, manage saved designs and read scan activity:
claude mcp add --transport http cookiepanda https://dashboard.cookiepanda.app/api/v1/mcp \
--header "Authorization: Bearer cp_apikey_…"Every change made through the API or MCP goes through the same validation, plan limits and audit log as the dashboard.
Frameworks & signals
Cookie Panda applies the right privacy framework per visitor and emits the standard consent signals the ad-tech and analytics ecosystem expects.
Regulations covered
GDPR — EU — prior consent, granular purposes, easy withdrawal
UK GDPR — United Kingdom post-Brexit regime
CCPA / CPRA — California — opt-out of sale / sharing
US state laws — Virginia, Colorado, Connecticut, Utah, Texas and more
LGPD — Brazil — consent and data-subject rights
PIPL — China — separate consent for sensitive data
COPPA — US — protections for users under 13
Standards & signals
IAB TCF v2.3 — Registered CMP, TC strings via the
__tcfapilocatorGoogle Consent Mode v2 — Emitted automatically — ad_storage, analytics_storage and more
Google Additional Consent — AC string for Google's non-TCF ad partners
IAB GPP — Global Privacy Platform — US national + state section strings
GPC — Global Privacy Control browser signal honored automatically
Consent API
Cookie Panda registers the standard CMP interfaces, so the tools and tags you already use can read consent the way they expect.
window.__tcfapi— the IAB TCF v2.3 CMP API for TC strings and per-purpose consent.window.__gpp— the IAB Global Privacy Platform API for US national and state strings.window.CookiePanda—categories(),hasDecision(),show(),showPreferences(),on()/off()for events, and the methods below. See Reopening the banner for links that need no code.getAdParams()— one call returns ad-server-ready signals (TC string, GPP, Google AC, plus derivednpa/ltd/rdp) for GAM, IMA, Prebid and OpenRTB.knownAge/setAge()— profile-aware COPPA: pass a known age to skip the gate and auto-block advertising & analytics for children.
// The IAB TCF v2.3 CMP API is available on window.__tcfapi
window.__tcfapi("getTCData", 2, (tcData, success) => {
if (!success) return;
// Standard TC string + per-purpose consent
console.log(tcData.tcString);
console.log(tcData.purpose.consents); // { "1": true, "2": false, ... }
});
// Reopen the preferences UI at any time (e.g. a "Cookie settings" link)
window.CookiePanda?.showPreferences();// Ad-server-ready signals from the live consent state
const p = window.CookiePanda.getAdParams();
// → { gdpr, gdpr_consent, addtl_consent, gpp, gpp_sid,
// us_privacy, npa, ltd, rdp }
// Drop straight into a Google Ad Manager / IMA tag, Prebid or OpenRTB:
// &gdpr=${p.gdpr}&gdpr_consent=${p.gdpr_consent}
// &gpp=${p.gpp}&gpp_sid=${p.gpp_sid.join(",")}&npa=${p.npa}<d=${p.ltd}// Profile-aware COPPA: pass a known age and no gate is shown.
// Under 13 → consent is locked to essential-only, ads/analytics blocked.
window.cookiePanda = { token: "cp_xxx", knownAge: 8 }; // or child: true
// On a profile switch (kid <-> adult), re-apply live — no reload:
window.CookiePanda.setAge(8); // child → blocked
window.CookiePanda.setAge(34); // adult → normal bannerData subject requests
Privacy laws give people the right to access, delete or opt out of the sale of their data — and you have to give them a way to ask.
Every site gets a public, no-login data-subject-request (DSAR) intake form. Link it from your privacy policy and visitors can file access, deletion and opt-out requests without an account. Submissions land in a dashboard workflow with SLA timers, so requests never go overdue.
Get compliant today. Stay compliant for good.
Join the teams using Cookie Panda to turn privacy compliance from a liability into a signal of trust. Free to start — no credit card required.