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
       
  • Replied by admin on Wednesday, May 11 2022, 09:44 AM · Hide· #1
    Can you tell me, how usually you put the tracking code? Is it something inserted into the urls?
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by GarageCentraal on Thursday, May 12 2022, 01:40 PM · Hide· #2
    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,
  •  
  • Replied by GarageCentraal on Thursday, May 12 2022, 06:56 PM · Hide· #3
    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
  •  
  • Replied by admin on Saturday, May 14 2022, 03:50 AM · Hide· #4
    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 :
    https://www.youtube.com/watch?v=tMB97xfYQfYAfter 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=";
    }
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  •  
    Replied by GarageCentraal on Monday, May 16 2022, 02:11 PM · Hide· #5
    Hi,

    Thanks for your reply. Just to confirm, do I follow the modifications on the video exactly as indicated and then go and make the changes in the default.php line, correct?

    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
Your Response
Please login first in order for you to submit comments