Linux 软件免费装
Banner图

ZDAnalytics Connector (GA4 + GTM)

开发者 zdapps
更新时间 2026年1月14日 13:22
PHP版本: 7.4 及以上
WordPress版本: 6.9
版权: GPLv2 or later
版权网址: 版权信息

标签

google analytics google tag manager gtm cookie consent ga4

下载

1.8.6 1.8.9 1.8.10

详情介绍:

ZDAnalytics Connector helps you connect Google Analytics 4 (GA4) and/or Google Tag Manager (GTM) to your WordPress site without editing theme files. Key features

安装:

  1. Upload the plugin zip and activate it.
  2. Go to Settings → ZDAnalytics Connector.
  3. Enter your GA4 Measurement ID and/or GTM Container ID.
  4. (Optional) Enable consent requirement and set the consent cookie name used by your cookie banner plugin.

升级注意事项:

1.8.9
  • Added Basic/Advanced tabs in settings (simpler setup with optional advanced parameters).
  • Improved automatic consent key detection and clearer admin feedback.
  • Bundled required JS assets inside the plugin ZIP (admin + consent loader).
1.8.8
  • Added consent storage source (Cookie / Local Storage).
  • Added consent value list with safer matching for common consent plugins.
  • Added admin helper to auto-detect cookies/localStorage keys from the current browser.
1.8.7.1 Hotfix: Fixes a PHP parse error and ensures the cache-friendly consent loader runs correctly. 1.8.7 Switches tracking loading to a cache-friendly consent loader. If you require consent, verify your consent cookie name (default: cookie_notice_accepted).

常见问题:

Does this plugin track users by default?

No. You can disable tracking entirely using Enable tracking (opt-in). If Require consent before tracking is enabled, the plugin will not load Google scripts until consent is detected.

How does consent detection work?

If Require consent before tracking is enabled, the plugin checks the configured Consent cookie name (default: cookie_notice_accepted) for a value such as true, 1, yes, or accepted.\ If the cookie name is empty, developers can use the zdac_user_has_consented filter to integrate with custom consent logic.

Does this plugin provide a cookie banner?

No. Use any cookie/consent plugin you prefer and configure the cookie name in this plugin.

I use page caching (LiteSpeed/hosting cache/CDN). Will this work?

Yes. This plugin uses a small local loader script that checks consent in the browser and only then loads Google scripts, so it is compatible with full-page caching.

Should I use both GA4 and GTM at the same time?

You can, but avoid double-counting: if you load GA4 via GTM, you usually do not need to also set the GA4 Measurement ID in this plugin.

更新日志:

1.8.10 1.8.9 1.8.8 1.8.7.1 1.8.7 1.8.5