Consent
Peekbird can wait for your visitors' consent: until your consent banner says they agreed, nothing runs and nothing is stored in their browser. Choose where, in your site's Site settings:
- Only where the law requires it (recommended). Visitors in the EU and EEA, the UK (with Jersey, Guernsey, the Isle of Man and Gibraltar), 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.
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 clears Peekbird's cookies and stops it at once, and it stays off. Calls made before consent (such as attributes) wait, and apply once it's given.
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.