Linux 软件免费装
Banner图

Lean GA4 Tracker

开发者 maidulcu
更新时间 2025年8月11日 00:15
PHP版本: 8.2 及以上
WordPress版本: 6.7
版权: GPLv2 or later
版权网址: 版权信息

标签

tracking google analytics lightweight GA4

下载

1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3

详情介绍:

A lightweight, developer-friendly plugin to integrate Google Analytics 4 (GA4) tracking with WordPress. Designed for performance and simplicity, Lean GA4 Tracker lets you implement advanced GA4 tracking without the bloat of larger analytics plugins. Includes lightweight WooCommerce tracking for product views, cart actions, checkout, and purchases — no extra setup required. Consent Mode integration supports Complianz, CookieYes, Cookiebot, and native WordPress consent APIs.

安装:

  1. Upload the plugin files to /wp-content/plugins/lean-ga4-tracker
  2. Activate the plugin from your WordPress dashboard
  3. Go to Settings → Lean GA4 Tracker to configure

屏幕截图:

  • Authentication tab: Enter GA4 Property ID and Manual Access Token
  • Events tab: Define custom GA4 events using a JSON array
  • Debug tab: Enable Debug Mode to print event tracking output for admins
  • Privacy & Consent tab: Enable Consent Mode and integrate with cookie banner plugins

常见问题:

Can I track custom events without writing JavaScript?

Yes. You can enter a JSON array of custom GA4 events in the settings panel, and they will be dispatched automatically.

How does the plugin support Consent Mode?

It initializes GA4 with ad_storage: denied and analytics_storage: granted by default. You can modify or extend this via hooks.

Does this plugin support multisite networks?

Yes. Network admins can enforce a GA4 configuration across all sites or allow individual site overrides.

Where is the GA4 script loaded?

The script can be loaded using standard, async, or defer attributes — configurable from the admin settings.

Is the plugin suitable for developers?

Absolutely. The plugin is built using PSR-4 autoloading, Composer, and separates concerns with namespaced classes. It’s ready for extension or integration in your theme or stack.

Does the plugin support cookie consent banners?

Yes. While Lean GA4 Tracker does not include a built-in banner, it supports integration with popular cookie consent plugins including Complianz, CookieYes, and Cookiebot. You can optionally enable this integration from the Privacy tab in the plugin settings.

Can I use Google Consent Mode with this plugin?

Yes. If enabled in the Privacy tab, the plugin will initialize GA4 with Consent Mode defaults. You can manually trigger gtag('consent', 'update', ...) after consent is granted.

Can I track form submissions automatically?

Yes. Lean GA4 Tracker includes a Forms tab where you can enable GA4 event tracking for popular form plugins like Contact Form 7, WPForms, Fluent Forms, and others. No coding required.

Can I use this plugin with WooCommerce?

Yes. Lean GA4 Tracker includes built-in WooCommerce support. You can enable event tracking for product views, add to cart actions, checkout steps, and purchases — all dispatched using GA4 eCommerce event schema.

更新日志:

1.1.3 1.1.1 1.1.0 1.0.9 1.0.8 1.0.7 1.0.6 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 1.0