automattic/jetpack-cookie-consent
Composer 安装命令:
composer require automattic/jetpack-cookie-consent
包简介
GDPR cookie-consent banner, CCPA opt-out, and consent logging for WordPress.
README 文档
README
Cookie Consent (@automattic/jetpack-cookie-consent) is a plugin-agnostic package intended to provide a GDPR cookie-consent banner, a CCPA "Do Not Sell/Share" opt-out flow, geolocation-based consent-model selection, WP Consent API integration, and consent logging.
This package is currently scaffold-only (no runtime behavior yet) and includes a placeholder Interactivity module entry point so the build passes; feature code is introduced in follow-up PRs.
Usage
\Automattic\Jetpack\CookieConsent\Cookie_Consent::init();
Build the frontend module before use:
pnpm --filter @automattic/jetpack-cookie-consent build
Configuration
Filter jetpack_cookie_consent_config to override defaults (geo API URL, GDPR/CCPA region lists, cookie policy URL, and the Tracks event_prefix). The Tracks event prefix defaults to jetpack; set it to woocommerceanalytics to keep continuity with the WooCommerce/Unified Analytics Tracks stream.
Requirements
- PHP >= 7.2
- The WordPress Interactivity API (WP 6.5+ / Gutenberg).
- The WP Consent API plugin (provides
window.wp_set_consent) for writing consent state.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2026-06-18