Linux 软件免费装
Banner图

LandexHub Consent – Cookie Banner, GDPR & Google Consent Mode v2

开发者 landexhub
更新时间 2026年10月25日 21:46
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

cookies gdpr cookie-consent cookie-banner consent-mode

下载

0.9.4 0.9.2 0.9.3

详情介绍:

LandexHub Consent is a lightweight, configurable cookie consent banner (cookie bar) for WordPress. It sets the Google Consent Mode v2 default before the Google tags it loads, lets you gate third-party scripts behind consent, checks your front page for sources that load before the visitor decides, and records a privacy-minimal proof of consent — all stored in your own WordPress. No visitor IP address is stored in the consent log, and the plugin sends no telemetry and no data of its own anywhere. Google tags you choose to configure talk to Google, as described under External services. Features Privacy The plugin reports nothing about your site or your visitors to anyone. The consent log is written to a table in your own site, without IP addresses. Scripts you configure yourself (GTM, gtag.js) are loaded from Google. Plugin author: LandexHub — terms, privacy policy. LandexHub also makes a separate, optional add-on; this plugin does not need it. Source code Nothing in this plugin is minified, compressed or obfuscated. The JavaScript in assets/js/ is compiled from TypeScript, and those TypeScript sources ship with the plugin in the src/ folder together with the compiler configuration and build instructions (src/README.md). One command with the TypeScript compiler reproduces the shipped files byte for byte.

安装:

  1. Upload the plugin to /wp-content/plugins/landexhub-consent, or install it from Plugins → Add New.
  2. Activate the plugin.
  3. The three-step setup (appearance → measurement → site check) opens on first run; everything then lives under four tabs — Appearance, Services, Diagnostics, Advanced.
  4. Gate third-party scripts with type="text/plain" and data-consent-category — the Services page shows what was found and how to gate each source (guide: https://docs.landexhub.com/consent/blocking-scripts).

屏幕截图:

  • The preferences modal with per-category toggles.
  • Appearance editor with live preview of the bar.
  • Services: everything the front page loads, where each one comes from and whether consent governs it.
  • Step-by-step guide to gate a source by hand.
  • Diagnostics: a verdict built from real checks, each with its evidence.
  • Consent log with filters, export and wording snapshots.

升级注意事项:

0.9.4 Functional codes (payments, spam protection, pickup points) are listed apart and never reported as a problem; Services shows where each source comes from; a larger catalog and a more precise site check. URL passthrough is now an opt-in setting. 0.9.3 GTM triggers on the consent event fire wherever the container is printed in the page. Fixes in the Services page: "Verify the edit" returns to the service, no duplicate rows for inline sources, necessary services are not reported as problems. 0.9.2 Configurable consent log retention, opt-in credit link and stricter settings validation.

常见问题:

Does it store visitors' IP addresses?

Not in the consent log. It is privacy-minimal: it stores a random consent identifier, the chosen categories, a timestamp, the page path and a fingerprint of the bar texts. To limit abuse of the recording, a request counter is kept under a salted hash of the visitor's IP address; it expires after 10 minutes.

How do I handle a privacy request from an anonymous visitor?

A record of an anonymous visitor has no IP address, e-mail or other identifier besides its random consent ID, so the log alone cannot tie it to a person (GDPR art. 11). A visitor can identify their own records with their consent ID, shown at the bottom of the consent settings dialog. Search the Consent log for that ID to show or export the records; an erase button deletes them. Logged-in users are covered by the standard WordPress Export/Erase Personal Data tools.

Does it send data to third parties?

The plugin itself sends nothing: no telemetry, and consent records stay in your WordPress. If you configure a GTM container or a Google measurement ID, your visitors' browsers load those Google tags and they communicate with Google — see External services. Scripts you gate run only after consent and then talk to their own providers.

Does it support Google Consent Mode v2?

Yes, in advanced mode (the default) or basic mode. In advanced mode Google tags load before consent and send cookieless signals until the visitor agrees; in basic mode the gtag.js ID set in this plugin loads only after consent. The denied default is printed before the GTM container or gtag.js set in this plugin. If you set your own consent default elsewhere, turn the plugin's default off with the landexhub_consent_emit_consent_default filter; it is not detected automatically.

Can I block Google Analytics / Meta Pixel until consent?

Mark the script tag with type="text/plain" data-consent-category="marketing"; for an external script also move its address from src to data-src. Or gate an enqueued script with the LandexHub_Consent::block_handle( $handle, 'marketing' ) PHP helper. Google tags loaded through GTM or gtag.js follow Google Consent Mode, so they are usually not blocked; make sure the tags in your GTM container use consent settings — Custom HTML tags and non-Google tags in a container do not follow Consent Mode by themselves. Guide: Blocking scripts.

Can visitors change or withdraw their consent later?

Yes, always. By default a "Cookie settings" link is printed in the site footer; you can switch to a floating icon instead, place the [landexhub_consent_settings] shortcode or the "Cookie settings link" block anywhere, or call LandexHubConsent.openSettings() from your own link. A change updates Google Consent Mode and the WP Consent API immediately. One technical honesty note: a third-party script that already ran on the current page cannot be un-run — after a withdrawal it stays inactive from the next page load on.

What does the site check do?

It fetches your own front page (a request to your own server) and lists the third-party scripts, embedded frames and known tracking pixels it recognises in the HTML, who adds each of them and whether consent governs it. For every source that loads before consent it shows how to gate it by hand. It only sees the front page — a source that loads only on a subpage does not show up there.

Does it pass consent to other plugins?

Through two channels. When the free WP Consent API plugin is installed, the plugin publishes the visitor's decision on that shared standard, both in the browser and for wp_has_consent() in PHP, so plugins that read it can follow it. Google tags added by other plugins follow the Google Consent Mode v2 signals the plugin sends, as long as they load after its default. Tested end to end (first visit, accept, reload, withdrawal, consent reset): Site Kit by Google with its own Consent Mode on (it then reads the WP Consent API) and off (its Google tag follows Consent Mode), and MonsterInsights with a manually entered GA4 ID (its tag follows Consent Mode; it does not read the WP Consent API). Other plugins were not tested; check them on your site.

Can I show visitors a list of the services this site uses?

Yes — put the [landexhub_consent_services] shortcode (or the "Services & cookies overview" block) on your cookie policy page. It renders a table of the services found on your front page and the ones in your services list, with consent category, known cookies and privacy policy links. It is generated technical data, not legal advice.

Does the plugin make my site GDPR compliant?

No plugin can do that on its own. LandexHub Consent provides the technical tools — consent banner, script gating, proof of consent, data export and erasure. Whether your site complies depends on how it is configured and on what it does; that responsibility stays with the site owner.

Does it support IAB TCF?

No. The plugin does not implement the IAB Transparency & Consent Framework (no TC string, no registered CMP ID). If your site serves personalised ads through Google AdSense or Ad Manager to visitors in the EEA/UK, Google requires a TCF-certified CMP — this plugin is not the right tool for that setup. For sites without ad networks (analytics, marketing pixels, embeds), Consent Mode v2 and script gating cover the consent flow.

更新日志:

0.9.4 0.9.3 0.9.2 0.9.1 Initial release.