Next.js App Router
CookieChimpProvider is a server component. It reads the consent cookie, so a
returning visitor never sees the banner flash. See Next.js
for regions, the Pages Router, connected mode and strict CSP.
React
initialState so hydration matches. Read consent
in components with the hooks:
Plain JavaScript
Next steps
- Gate vendor tags with the script presets.
- Send Google Consent Mode v2 signals and block runtime-added scripts: see the reference.
- Translate the banner: translations.