Troubleshooting Guide for Lean GA4 Tracker
If your Google Analytics 4 events are not appearing, or you encounter errors during setup, this guide will help you identify and fix common issues.
No Data Appearing in Google Analytics 4
- Check Your Measurement ID
- Ensure the ID is in the correct format: G-XXXXXXXXXX.
- Copy it exactly from GA4 → Admin → Data Streams → Web Stream Details.
- Verify Script Loading
- Open your website in the browser.
- Press F12 (Developer Tools) → Network Tab.
- Reload the page and search for requests to www.googletagmanager.com or collect.
- Wait for Processing
- GA4 reports may take a few minutes to process data.
- Use DebugView for real-time verification.
DebugView Shows No Events
- Make sure Debug Mode is enabled in plugin settings.
- Use an Incognito Window to test as a new visitor.
- Clear any ad-blockers or privacy extensions—they may block GA scripts.
- Confirm cookie consent banners allow tracking (if applicable).
Invalid JSON in Custom Events
If you see errors when saving custom events:
- Ensure JSON is properly formatted.
- Example of a valid JSON array:
[
{
"event": "button_click",
"selector": "#signup-button"
}
]
❌ Invalid Example:
{
"event": "button_click"
}
(Events must always be wrapped inside an array [].)
WooCommerce Events Not Firing
- Confirm you are using WooCommerce 5.0+.
- Verify product, cart, and checkout templates are not overridden by your theme.
- Temporarily switch to a default theme (e.g., Twenty Twenty-Five) to test.
- Check GA4 → Monetization → E-commerce Purchases after a test order.
Form Submissions Not Tracking
- Ensure you are using a supported form plugin (Contact Form 7, WPForms, Gravity Forms, Ninja Forms).
- Check that your form uses standard submit actions (AJAX forms may need custom events).
- Use Debug Mode to confirm if a form_submit event is being fired.
Consent Mode Issues
- If you use a cookie plugin (Complianz, CookieYes, or Cookiebot), ensure it is configured correctly.
- Test by rejecting cookies → events should be limited.
- Accept cookies → full tracking should resume.
Excluding Roles Not Working
- Double-check selected roles in Exclude User Roles.
- Remember: Role-based exclusion prevents scripts from loading at all.
- Test by logging in as Admin (tracking should be disabled).
Conflicts with Other Plugins
- Disable other analytics or tag manager plugins temporarily.
- If events work, re-enable plugins one by one to find the conflict.
- Common conflicts: multiple GA4 or GTM scripts loading simultaneously.
Advanced Debugging
- Enable Debug Mode in settings.
- Open Developer Console → look for messages like:
Lean GA4 Tracker: Event fired → view_item
- If no logs appear, confirm plugin settings are saved and cache is cleared.
Still Having Issues?
- Check the Plugin Support Forum on WordPress.org.
- Report bugs or request features on GitHub.
- Include details: WordPress version, plugin version, active theme, list of plugins.
✅ Next: Visit the Roadmap & Changelog to see upcoming features and updates.