Track google analytics, facebook pixel or any other event tracking tool you are using for your Shopify online store.


You can track WhatsApp Chat widget button, WhatsApp Chat button, Share bar and product share button clicks with the code given below,


window.spWhatsAppTrack = function(buttonType){
   
   if(buttonType == 'shareButton'){
       // Your code here....
   }else if(buttonType == 'widgetButton'){
       // Your code here....
   }else if(buttonType == 'shareBar'){
       // Your code here....
   }else if(buttonType == 'productShare'){
       // Your code here....
   }
};


Insert & use this code somewhere before the </body> tag in theme.liquid