_pgnt-seed, which keeps test groups stable for a day, and _pgnt-opt-in, which stores the visitor’s choice. List them in your cookie declaration. Your cookie banner tells pagent about the visitor’s choice through two commands. See the consent guide for how pagent handles consent, including the strict option that holds back all data until opt-in.
1. Add pagent as a service
In the Usercentrics admin, add pagent as a custom service named pagent in the category you use for analytics. The script below looks the service up by that name.2. Keep Usercentrics from blocking pagent
With auto-blocking, mark the pagent snippet withdata-uc-allowed="true", so it loads before the page shows:
3. Pass the consent to pagent
Add the script for your Usercentrics version after the pagent snippet.- Web CMP (v3)
- Browser UI (v2)
This reads the visitor’s stored choice when the page loads, and listens for the
UC_CONSENT event whenever the choice changes:Check it worked
- Open your site in a private window and accept the pagent service.
- In your browser’s developer tools, check that pagent’s cookies starting with
_pgntappear. - Reopen the privacy settings, deny pagent, and check that they’re removed again, except
_pgnt-seedand_pgnt-opt-in, which now readsfalse.