Skip to main content
pagent loads early and reacts to your visitors’ consent: it reports pseudonymous data before consent and stores its persistent cookies only after an opt-in. Two cookies are set without it: _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. Keep Cookiebot from blocking pagent

With Cookiebot’s automatic blocking, mark the pagent snippet with data-cookieconsent="ignore", so it loads before the page shows. pagent then follows the visitor’s choice from step 2.
Keep the Cookiebot script itself first in <head>, as Cookiebot requires. Add this script after the pagent snippet. It sends opt-in when the visitor accepts statistics cookies, and opt-out otherwise, on every page load and whenever the visitor changes their choice:
Prefer another category? Replace statistics with marketing or preferences, to match how you describe pagent in your cookie declaration.

Check it worked

  1. Open your site in a private window and accept statistics cookies.
  2. In your browser’s developer tools, check that pagent’s cookies starting with _pgnt appear.
  3. Open Cookiebot → Change your consent, decline statistics, and check that they’re removed again, except _pgnt-seed and _pgnt-opt-in, which now reads false.