Plugin Author
Creame
(@creapuntome)
Hi, you can view in our FAQs at https://wordpress.org/plugins/creame-whatsapp-me/#google%20analytics%204%20integration e.g. change GA4 “generate_lead” event to “Joinchat”:
add_filter( 'joinchat_get_settings', function( $settings ){
$settings['ga_event'] = 'Joinchat';
return $settings;
} );
Hello, thank you. This changes the name of the event to ‘Joinchat’, but I’d like to disable the event altogether, is that possible?
Plugin Author
Creame
(@creapuntome)
I think the easiest option is to change the GA4 event to any other and ignore it in your GA dashboard.
But you can disable send all events via javascript. It is also in FAQs.
jQuery(document).on('joinchat:event', function (event, params) { return false; });
Or trigger only your custom GTM event:
jQuery(document).on('joinchat:event', function (event, params) {
dataLayer.push({ event:'my_cutom_event' });
// Uncomment to disable Joinchat tracking events (GA4, GTM, FB, GAds)
// return false;
});
Okay, will change into a custom event name, thanks.
A control from the admin to disable/enable GA4 events and set the event name would be convenient.