Troubleshooting Joinchat Google Analytics 4 (GA4) Event Tracking Issues
Content
If your Joinchat plugin has stopped sending WhatsApp click events to Google Analytics 4 (GA4), you're not alone. This is a common issue reported by users after updates or changes to their analytics setup. This guide will help you diagnose and fix the problem.
Why Joinchat GA4 Events Stop Working
Based on community reports, the most common causes are:
- Conflicts with MonsterInsights: This popular analytics plugin uses a custom tracker name (
__gaTracker) instead of the standardgaorgtagobject that Joinchat expects. - JavaScript Optimization Plugins: Caching or minification tools can sometimes break the JavaScript event that triggers the analytics call.
- Multiple Tracking Codes: Having both Universal Analytics (UA) and GA4 codes, or duplicate tags, can create conflicts.
- Plugin Changes: The Joinchat team has updated their analytics implementation over time, which can affect existing setups.
How to Fix Joinchat GA4 Tracking
Solution 1: Fix MonsterInsights Compatibility
If you use MonsterInsights, try these steps:
- Enable Compatibility Mode: In your MonsterInsights settings, look for a "Compatibility Mode" option and enable it.
- Add Custom JavaScript (Alternative): If compatibility mode doesn't work, add this code to your site (in a custom HTML widget or via your theme's header):
<script> (function ($) { $(document).on('joinchat:event', function (event, params) { __gaTracker('set', 'transport', 'beacon'); __gaTracker.getAll().forEach(function (tracker) { tracker.send("event", 'JoinChat', 'click', params.event_label); }); }); }(jQuery)); </script>
Solution 2: Disable Conflicting Plugins Temporarily
Temporarily disable any caching, minification, or JavaScript optimization plugins. Clear all caches and test if GA4 events start working. If they do, re-enable plugins one by one to identify the culprit, then adjust its settings to exclude Joinchat scripts from optimization.
Solution 3: Check for Multiple GA Tags
Use your browser's developer tools (F12) to check the Console and Network tabs for errors. Look for multiple Google Analytics tags or errors mentioning ga, gtag, or __gaTracker. Ensure you have only one clean GA4 implementation.
Solution 4: Customize or Disable the Default Event
You can modify the default GA4 event behavior using filters or JavaScript:
Change the Event Name: Add this PHP code to your theme's functions.php file to change the event name from 'generate_lead' to something else:
add_filter( 'joinchat_get_settings', function( $settings ){
$settings['ga_event'] = 'Joinchat';
return $settings;
} );
Disable Joinchat Events Entirely: If you prefer to handle tracking entirely through Google Tag Manager, you can prevent Joinchat from sending its default events with this JavaScript snippet:
jQuery(document).on('joinchat:event', function (event, params) {
// Return false to stop all default events
return false;
// Or, send your own custom event to GTM here instead
});
Need More Help?
If these solutions don't resolve your issue, check the official Joinchat FAQ section for more code examples and advanced configuration options. The Joinchat team has historically been responsive to these common GA4 integration issues in their support forums.
Related Support Threads Support
-
Google Analytics Event Labelhttps://wordpress.org/support/topic/google-analytics-event-label/
-
Integration with Zapierhttps://wordpress.org/support/topic/integration-with-zapier-3/
-
Google Analytics Event Changehttps://wordpress.org/support/topic/google-analytics-event-change/
-
GA events don’t workhttps://wordpress.org/support/topic/ga-events-dont-work/
-
Eventos no Google Analyticshttps://wordpress.org/support/topic/eventos-no-google-analytics/
-
Google Analytics 4https://wordpress.org/support/topic/googla-analyrtics-4/
-
Google Analitycs events missinghttps://wordpress.org/support/topic/google-analitycs-events-missing/
-
Enhanced conversions has no recent datahttps://wordpress.org/support/topic/enhanced-conversions-has-no-recent-data/
-
Google Analytics 4https://wordpress.org/support/topic/google-analytics-4-8/
-
Disable auto GA4 generate_lead eventhttps://wordpress.org/support/topic/disable-auto-ga4-generate_lead-event/
-
Google analyticshttps://wordpress.org/support/topic/google-analytics-230/
-
Change GA Tracking Naminghttps://wordpress.org/support/topic/change-ga-tracking-naming/
-
Integration with Facebook Eventshttps://wordpress.org/support/topic/integration-with-facebook-events/
-
Google Analytics event not shownhttps://wordpress.org/support/topic/google-analytics-event-not-shown/
-
Google Analyticshttps://wordpress.org/support/topic/google-analytics-174/
-
integration with new google Analytics (Analytics 4)https://wordpress.org/support/topic/integration-with-new-google-analytics-analytics-4/
-
GA4 – Not working eventhttps://wordpress.org/support/topic/ga4-not-working-event/