Integration
Choose one of three consent paths: default (consent-aware), strict (withhold data until consent), or alternative (disable opt-in). All three use only first-party cookies, never third-party cookies.Default path (consent-aware)
Visitors start not opted in. Pagent still runs tests and reports pseudonymous events, but does not write persistent visitor-ID, visit, variation, or cohort cookies or local storage before consent. A short-lived, daily-rotating seed cookie is still set to keep test assignment stable within a day.Strict path: withholding data until consent
Keep the default consent wiring and adddata-require-consent="true" to the SDK snippet:
opt-in command. Buffered events are then sent in bulk with their original timestamps.
- The buffer lives in memory only, with a soft limit of 1,000 events per page load. Older behavioral events are discarded first; session and conversion events are preserved where possible, so the buffer can exceed that limit.
- Nothing in the buffer survives a page reload. Visitors who leave without ever consenting are never reported.
- The
opt-outcommand discards the buffered events. - Use your consent platform as the source of truth. Queue an
opt-incommand on every page load where your consent platform reports acceptance. data-disable-opt-in="true"takes precedence: if both attributes are set,data-require-consent="true"has no effect.- The daily seed cookie is still set to keep assignment stable. This flag gates event reporting; it does not prevent the SDK and experiment configuration from loading.
Alternative path: disabling opt-in
Usedata-disable-opt-in="true" to treat every visitor as opted in immediately. This writes identifiers and reports events as soon as the SDK loads.
Giving consent
When your consent platform records acceptance, queue anopt-in command. This pattern works before and after the SDK loads:
Withdrawing consent (opt-out)
On decline or withdrawal, queue anopt-out command. This pattern also works before and after the SDK loads:
Daily seed and persistent identifiers
Before consent, Pagent derives identity from a daily-rotating seed instead of a persistent visitor ID. The short-lived_pgnt-seed cookie keeps assignment stable within a day and carries no stored personal identifier. It is set in both the default and strict paths, so neither path is entirely cookie-free.
After opt-in, Pagent can write persistent identifiers for visitor, visit, variation, and cohort tracking. Choose the consent path that fits your site’s consent platform and privacy policy.
See the SDK integration guide for loading strategies and other snippet attributes.