Configuration Guide for Lean GA4 Tracker

Once you’ve completed the Getting Started setup, Lean GA4 Tracker offers several configuration options to customize tracking for performance, privacy, and integrations like WooCommerce and forms.


General Settings

Script Loading Mode

You can control how the GA4 tracking script is loaded:

  • Default → Standard script loading.
  • Async → Loads asynchronously, improving page speed.
  • Defer → Loads after page content, reducing render-blocking.

Recommended: Use Async or Defer for best performance.


Exclude User Roles

Prevent specific WordPress user roles from being tracked in GA4.

For example, exclude Administrator and Editor so internal activity doesn’t pollute analytics data.


Consent Mode

Lean GA4 Tracker supports Google Consent Mode for GDPR/CCPA compliance.

It integrates with popular cookie consent plugins, including:

  • Complianz
  • CookieYes
  • Cookiebot

When a user declines tracking, GA4 automatically adjusts data collection.


WooCommerce Integration

Lean GA4 Tracker automatically tracks essential WooCommerce e-commerce events:

  • View Item → When a product page is visited.
  • Add to Cart → When a product is added to the cart.
  • Begin Checkout → When checkout is started.
  • Purchase → When an order is completed.

💡 These events will appear in GA4 → Reports → Monetization.


Forms Integration

The plugin supports tracking form submissions for popular plugins:

  • Contact Form 7
  • WPForms
  • Gravity Forms
  • Ninja Forms

👉 Each submission is recorded as a GA4 form_submit event.

For unsupported form plugins, you can use Custom Events (see below).


Custom Events

You can define your own events in JSON format directly in the plugin settings.

Example: tracking a newsletter signup button click:

[
  {
    "event": "newsletter_signup",
    "selector": "#signup-button"
  }
]
  • event → The GA4 event name.
  • selector → CSS selector of the element being tracked.

Add multiple events as JSON objects inside the array.


Debug Mode

Enable Debug Mode in settings to test tracking:

  • Shows event firing logs in the browser console.
  • Helps validate JSON custom events.
  • Displays warnings for invalid setup.

Multisite Setup

If using WordPress Multisite:

  • Configure settings network-wide to enforce consistency.
  • Or allow individual sites to override and set their own GA4 IDs.

Next Steps

Now that your plugin is configured, proceed to the Advanced Topics Guide to learn about using Google Tag Manager, firing manual events, and developer customization.

Let Us Work Together

Let us Plan Your Website or Digital Strategy Together

Start My Proposal Now →
Configuration Guide for Lean GA4 Tracker – Lean GA4 Tracker Documentation