Categories & regulations
The four categories
Section titled “The four categories”necessary (always granted), preferences, statistics, marketing. Choose
which optional ones to show:
lightning("init", { categories: ["preferences", "statistics", "marketing"] });necessary is always included and can’t be toggled off. See
How it works for what each governs.
Regulation model
Section titled “Regulation model”Resolved at the edge from the visitor’s region:
gdpr— opt-in; optional categories default denied, banner shown.ccpa— opt-out; optional categories default granted, GPC honoured, “Do Not Sell or Share” offered.none— no banner.
Force one model everywhere with geo:
lightning("init", { geo: "gdpr" }); // "auto" (default) | "gdpr" | "ccpa" | "none"Global Privacy Control
Section titled “Global Privacy Control”Honoured by default under US law. Turn it off only if you have a specific reason:
lightning("init", { respectGpc: false }); // default: trueRe-prompting
Section titled “Re-prompting”lightning("init", { consentExpiryDays: 180 }); // 0 = never re-prompt (default)After the set number of days a stored decision expires and the banner returns.