Integration
By default, pagent uses opt-in tracking: it uses cookie-less tracking for up to 24h and sets a permanent cookie only onceopt-in is triggered. No cookies are created by our SDK unless you explicitly give it consent.
Here is the default integration:
Disabling Opt-In (Testing Only)
For testing purposes only, you can disable the opt-in requirement using thedata-disable-opt-in flag. This will set cookies immediately upon page load.
⚠️ Warning: The data-disable-opt-in flag should only be used for testing purposes. In production, especially in the EU, you should use the default opt-in behavior to comply with GDPR requirements.
Giving consent
Once you have consent from your user, execute theopt-in command as follows:
Withdrawing consent (opt-out)
If you need to explicitly opt a user out of tracking and experimentation, you can use theopt-out command:
- Implementing a custom consent banner or preference center
- Respecting user privacy choices programmatically
- Compliance with GDPR, CCPA, or other privacy regulations
Cookieless tracking
Pagent can also operate completely without cookies. In this cookieless mode we still need to recognise a visitor long enough to keep A/B tests consistent, but we do so only for 24 hours and without storing any data in the browser. Because no persistent identifier is written, this mode typically does not require a cookie banner.How visitor consistency works
When the SDK loads it derives a short-lived, deterministic seed:- salt – a random 64-byte string generated by our backend and rotated every 24h
- ip – the visitor’s IP address (truncated, e.g. /24 for IPv4, /56 for IPv6)
- userAgent – the browser’s user-agent string
opt-in: experiments stay consistent within the 24-hour window, yet no long-term tracking occurs until consent is given.