WhatsApp Multi Agent analytics

Hi,

I am interested in having analytics detect whenever a user clicks on any of the windows to activate the redirect to the api.whatsapp.com page with the message (or the app, if in mobile). That data we want to have it checked and tabulated to management using Google Data Studio.

Please indicate procedure to have that tracking available.

Rgds,

Rodney
1 year 11 months ago #1 by Rodney Kock

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5193) Offline
Can you tell me, how usually you put the tracking code? Is it something inserted into the urls?
1 year 11 months ago #2 by TemplatePlazza

Please Log in or Create an account to join the conversation.

The tracking code is enabled using the Google Tag Manager. It is tracking now a different set of WhatsApp links on our website using a custom trigger that checks out whenever a customer clicks on links to be contacted via WhtasApp using a direct link (it uses the wa.me url, instead of the api.whatsapp.com usl used by the WhatsApp Multi Agent).

Please advice. Our final goal is to be able to track outbound links originated from your application to each of the three listed contact numbers on our WhatsApp Multi Agent implementation. We want to have these statistics reflected on a Google Data Studio report we already have prepared, and are attempting to populate with as much data as possible.

Rgds,
1 year 11 months ago #3 by Rodney Kock

Please Log in or Create an account to join the conversation.

Also, I attempted to do the same Google Tag Manager trigger event for the api.whatsapp URL as originated by the module, but is not detected by the analytics
1 year 11 months ago #4 by Rodney Kock

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5193) Offline
Hi sorry for delayed response.
You can do that using template override. If don't know how to create override, you can follow this video :
you have created override for whatsapp module, then change these code of default.php (line 290) :
if($watarget == 0){
	$clickdirect = 'onClick="parent.location=\'https://'.$waurl.'.whatsapp.com/send?phone='.$item->agent_phone_number.'\'"';
}else{
	$clickdirect = 'onClick="parent.open(\'https://'.$waurl.'.whatsapp.com/send?phone='.$item->agent_phone_number.'\')"';
}

into
if($watarget == 0){
	$clickdirect = 'onClick="parent.location=\'https://wa.me/send?phone='.$item->agent_phone_number.'\'"';
}else{
	$clickdirect = 'onClick="parent.open(\'https://wa.me/send?phone='.$item->agent_phone_number.'\')"';
}

and this one (line 579)
if ((/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)) && (window.navigator.userAgent.indexOf("Windows")!= -1) ) {
	var URL = "https://web.whatsapp.com/send?phone=";
}else {
	var URL = "https://<?php echo $waurl;?>.whatsapp.com/send?phone=";
}

into this :
if ((/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)) && (window.navigator.userAgent.indexOf("Windows")!= -1) ) {
	var URL = "https://wa.me/send?phone=";
}else {
	var URL = "https://wa.me/send?phone=";
}
1 year 11 months ago #5 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Hi,

Thanks for your reply. Attempting the override on the default.php module seems to have run into a problem. The code on line 290 was as indicated. However, the code on 579 differed from the one on our servier. Please indicate exact path for default.php please?

Also on an unrelated question, you indicate that the changes will survive update. Will they also be valid whenever we decide to transition from 3.10 to Joomla 4?

Rgds,

Rodney
1 year 11 months ago #6 by Rodney Kock

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum