Skip to content
Peekbird

Consent

Peekbird can wait for your visitors' consent: until your consent banner says they agreed, nothing runs and nothing is stored in their browser except their answer. Choose where, in your site's Site settings:

  • Only where the law requires it (recommended). Visitors in Quebec, California, Pennsylvania, Florida, Massachusetts, Washington, South Korea, Turkey, Brazil, India and China are asked first. Everywhere else Peekbird runs from the first visit until they decline, and browsers with Global Privacy Control count as declined.
  • Everywhere. Every visitor is asked first.
  • Don't wait. It runs for everyone; a visitor who declines is still respected.

In the EU, the EEA, the UK (with Jersey, Guernsey, the Isle of Man and Gibraltar) and Switzerland, Peekbird doesn't run at all, whichever you choose: it isn't offered there yet, and it keeps nothing it receives from there. Those visitors see your pages as they are, and your banner is told it needn't ask about Peekbird.

A new site starts on Don't wait, so data arrives as soon as the snippet is in, before you've connected a banner. Sites created by the Shopify app start on Only where the law requires it, since the store's own banner answers for them.

To know where a visitor is, Only where the law requires it asks Peekbird's server, which works it out from their IP address and stores neither. The answer (ask first, or run) is kept in the tab's session storage, so it isn't asked again on every page.

From your consent banner

Call this when the visitor agrees, or declines:

window.peekbird = window.peekbird || [];
// When the visitor agrees:
peekbird.push(['consent', true]);

// When they decline, or withdraw it (Peekbird's cookies are cleared, and it stays off for them):
peekbird.push(['consent', false]);

The answer is remembered for the visitor. Declining stops Peekbird at once and removes everything it stored in their browser, except the answer itself, and it stays off. Calls made before consent (such as attributes) wait, and apply once it's given.

On your servers

The server SDKs follow the same rule. For a visitor who hasn't agreed, where your site waits, they set no cookies and send no events, and "In your code" experiments answer with no variation. They know the visitor's answer from the cookie Peekbird keeps for it, and where they are from Cloudflare's location headers or the snippet's location cookie. When your own banner knows, pass it as consent.

Which banner to show

Waiting only where the law requires it, a visitor needs one of two things: a banner that asks first, or a short notice they can decline from. Peekbird knows which, from where they are:

window.peekbird = window.peekbird || [];
peekbird.push(['consentMode', function (mode, answer) {
  if (answer) return;                  // answered already ('accepted' or 'declined')
  if (mode === 'ask') showBanner();    // must agree first: Accept and Decline
  if (mode === 'notice') showNotice(); // already running: a short notice with Decline
}]);

mode is ask (agree first), notice (running; they can decline) or off (the site doesn't wait). answer is accepted, declined or null if they haven't answered.

See what your visitors see.

Start free in a few minutes: one snippet, every feature. Move to a bigger plan when you need more tracked visits.