Skip to content

Categories & regulations

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.

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"

Honoured by default under US law. Turn it off only if you have a specific reason:

lightning("init", { respectGpc: false }); // default: true
lightning("init", { consentExpiryDays: 180 }); // 0 = never re-prompt (default)

After the set number of days a stored decision expires and the banner returns.