
CookieHug
v0.2.9CookieHug CMP · 2026年9月13日 上架
Connect WordPress to CookieHug, a hosted cookie-consent platform with WP Consent API support. Configure everything in the dashboard.
- 正在使用
- 10 以下
- 评分
- 暂无
- 累计下载
- 271
- 最近更新
- 2026年11月19日
贡献者
截图
CookieHug is a platform-first cookie consent solution. The WordPress plugin does three things and nothing more:
- Pairs your site with a CookieHug account via a one-time handshake.
- Injects the consent banner snippet as the first script in
<head>on every page (synchronous, so it runs before any tracker). - Gives you a one-click link back to the CookieHug dashboard where you actually configure things.
Everything else — banner texts, colours, categories, Google Consent Mode v2, cookie scan results, translations — is managed in the CookieHug dashboard, not in WordPress. This is by design. It means:
- Config changes propagate instantly without touching the site.
- Upgrades to the consent logic happen on the platform side — no plugin update required for most fixes.
- The plugin surface area stays tiny, which is what you want from something that runs on every request.
If you’re looking for a plugin where you edit banner text in the WP admin, this isn’t it. Use the CookieHug dashboard.
WP Consent API
CookieHug integrates with the WP Consent API. When that plugin is active, every choice a visitor makes in the CookieHug banner is mirrored into the shared Consent API, so any other plugin on your site can gate its own cookies and scripts with wp_has_consent(). CookieHug registers as the site’s consent management plugin and sets the consent type to opt-in (non-essential categories denied until the visitor consents). Where your CookieHug regional rules use opt-out or “no banner” (for example: banner in the EEA, no banner in the US), the bridge switches the consent type to opt-out in the browser and reports every category as allowed until the visitor objects, so wp_has_consent() matches what the banner does in that region.
Category mapping (CookieHug WP Consent API):
- necessary functional (always allowed)
- preferences preferences
- statistics statistics, statistics-anonymous
- marketing marketing
This is required for, and verified by, Google’s CMP Partner Program: it is not enough to support Consent Mode — a WordPress plugin must also use the WP Consent API.
External services
This plugin connects your site to CookieHug, a hosted consent-management service operated at https://cookiehug.com. The plugin is a connector — the consent banner, cookie scanning, and all configuration run on the CookieHug platform — so it has to communicate with that service to function. Nothing is sent until you click Connect with CookieHug and complete the handshake; an unconnected plugin makes no external requests.
What is sent to cookiehug.com, and when:
- During connection (one-time handshake): your site URL, site name, WordPress version, PHP version, and the plugin version, so the dashboard can register and identify the site.
- Periodic heartbeat (about once a day, and when you open the plugin’s settings page): the connection key, the current plugin / WordPress / PHP versions, and a software freshness report: the newest WordPress core version your site already knows about, plus the list of installed plugins (slug, name, version, whether it is active, and the newest version WordPress has already detected for it). Only component names and version numbers are sent, never content or user data. The dashboard uses this to show the site as active and to warn you about outdated software. This runs only while the site is connected.
- Status checks (from wp-admin): the connection key, to retrieve the account/plan/license state shown on the settings page.
- Consent banner script (on every front-end page view): visitors’ browsers load
https://cookiehug.com/api/script/<key>.js. Standard web-request metadata (IP address, user agent) reaches CookieHug as part of serving that script, exactly as it would for any third-party script. The banner’s consent logic and the choices visitors make are handled by the CookieHug platform.
Use of the CookieHug service is governed by its Terms of Service and Privacy Policy:
- Terms of Service: https://cookiehug.com/terms
- Privacy Policy: https://cookiehug.com/privacy
A CookieHug account is required. The service is provided by CookieHug and is not affiliated with WordPress.org.
