Guides
Cookie consent
No optional script runs before a visitor chooses.
@makev1/consent shows a banner on the first visit, with Reject all as easy as Accept all. Visitors can change their choice any time from the footer link. A new consent.policyVersion in makev1.config.ts asks everyone again, and so does a choice older than a year. Global Privacy Control turns marketing off.
Loading scripts
import { ConsentGate, loadWhenAllowed } from '@makev1/consent';
// A script, once analytics is allowed (now or later):
loadWhenAllowed('analytics', policyVersion, 'https://plausible.io/js/script.js');
// Or any element:
<ConsentGate category="marketing"><YourPixel /></ConsentGate>Each decision is recorded through POST /api/v1/consent with a random id and the choices, never personal data, as proof of consent.