Overview
Load third-party tools only after consent, with a ready-made integration or your own.
An integration loads a third-party tool only after the visitor grants its category, and stops it again when consent is withdrawn. You add it to initCookieYes() once; no consent checks in your own code. Every ready-made integration comes from one extra package:
npm install @cookieyes/scriptsPick your tool:
Google Analytics 4
Load GA4 and keep its Consent Mode signals up to date.
Google Tag Manager
Load your container and keep its Consent Mode signals up to date.
Google Ads
Load conversion tracking and keep its Consent Mode signals up to date.
Meta Pixel
Load the pixel only after advertising consent.
Microsoft Clarity
Load Clarity only after analytics consent.
PostHog
Turn PostHog capture on and off with consent.
Segment
Load Segment only after analytics consent.
Using Google Analytics, Google Ads or Tag Manager? Google reads consent through its own Consent Mode. Add its default snippet first: Google Consent Mode v2.
Tool not listed? Custom integration loads any script after consent in a few lines.