跳到内容

PD17 Cookie Consent Banner

v1.1.7

ProDev17 · 2026年10月26日 上架

Lightweight cookie consent banner for WordPress, compatible with Google Consent Mode v2 and Google Tag Manager.

正在使用
10 以下
评分
暂无
累计下载
141
最近更新
2026年10月26日
需要 WordPress 6.0+已测试到 7.1.5PHP 7.4+

贡献者

PD17 Cookie Consent Banner is a lightweight, user-friendly cookie consent plugin for WordPress. It helps site owners comply with GDPR, CCPA and similar privacy regulations while sending consent signals that Google Consent Mode v2 understands.

Features

  • Consent Mode v2 support: pushes consent defaults and updates to the dataLayer.
  • Works with Google Tag Manager and Google tags.
  • Customizable banner: bar or modal layout, custom text and buttons.
  • Per-button styling and automatic detection of the active theme colors.
  • Light and dark banner themes, plus custom background colors and text sizes for the main banner and settings modal.
  • Custom color for consent checkboxes in the settings modal.
  • Reject action clears non-essential cookies and browser storage, keeps WordPress technical cookies, and reloads the page.
  • Consent categories with labels, descriptions and default states.
  • Custom labels for “Always active”, “On by default” and “Off by default” badges.
  • Optional additional details for the settings modal description, with customizable Show/Hide details labels.
  • Optional Google Tag Manager snippet fields.
  • Settings link shortcode: [consent_banner_settings_link].
  • Lightweight: the banner library is bundled locally, no external CDN requests.
  • Translation ready.

How it works

On page load the plugin pushes the configured consent defaults to the dataLayer. When a visitor saves their preferences, the plugin updates the consent state and stores the choice in the browser’s localStorage under the consent_preferences key. Nothing is stored on the server.

When a visitor rejects, optional categories are denied, required categories stay granted, non-essential cookies and browser storage are cleared, and the page reloads. WordPress technical cookies and the consent_preferences choice are preserved.

The banner settings are available under Settings в†’ PD17 Cookie Consent.

External services

The plugin does not contact external services on its own and does not send visitor data to the plugin author.

If you use the optional Google Tag Manager snippet fields, the plugin outputs the snippet you provide. When that snippet runs, data is sent to Google according to your container configuration. Google Tag Manager is subject to Google’s Terms of Service and Privacy Policy:

  • Terms: https://policies.google.com/terms
  • Privacy: https://policies.google.com/privacy

If you leave the snippet fields empty, the plugin makes no requests to Google.

Credits

The banner UI is based on consent-banner-js by Tag Concierge, version 1.2.3, licensed under the MIT License. The library is bundled in assets/vendor/consent-banner-js/ together with its license text.

https://github.com/tagconcierge/consent-banner-js

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums