Consent Core

Framework-agnostic cookie consent state, Google Consent Mode v2 and consent-gated script loading

Community 9 71/wk MIT v0.1.0

Installation

pnpm add @payload-solutions/consent-core

About

Consent Core is the browser-side logic behind cookie consent for Payload sites. It keeps track of what a visitor has accepted, stores that decision in a cookie, and only loads third-party scripts once the matching category is granted. Each jurisdiction can be set to opt-in, opt-out, notice only, or none, so a site can follow different rules for different regions.

It also forwards consent decisions to Google Consent Mode v2 and honors the Global Privacy Control signal from the visitor's browser. The same resolution logic runs on the server side of the Payload plugin, so the server and the page agree on what is granted. It works with any front-end framework because it has no framework dependency.

Package info

Package name
@payload-solutions/consent-core
Latest version
0.1.0
Unpacked size
91 kB
License
MIT
Weekly downloads
71
Last publish
Sep 7, 2026

More from mpresecan

View profile

Schedules one-off, recurring and cron-based actions that run on the Payload job queue

Scaffolds a SaaS project on Payload with database, auth, billing and storage chosen up front

Cookie banner, script gating, legal pages and consent records managed in the admin

Newsletters sent through Resend Broadcasts, with Payload collections as subscriber sources

Triggers Vercel deploy hooks after Payload content changes, with status and rollback

Code-defined transactional emails with admin-editable copy, test sends and a send log

Similar plugins

More in Analytics

Creates and syncs Dub shortlinks for Payload documents as they are published

Sends Payload server errors and selected HTTP errors to Sentry with user context

Splits page traffic between variants you create in the Payload admin

Sales totals by period, product and customer for Payload ecommerce stores

Logs AI crawler visits, serves llms.txt and shows an AI visibility dashboard

Tracks AI API token spend and stops jobs when daily, monthly or per-job budgets run out