Integration with analytical tags

It’s important to know how users interact with your site and where they contact most through WhatsApp.

WidgetWhats automatically recognizes if Google Analytics, Google Tag Manager and Facebook Pixel are present on your site and sends an event when the user launches WhatsApp.

Google Analytics

It is compatible with Global Site Tag (gtag.js) and Universal Analtics (analytics.js). An event is sent with the parameters:

action: 'click'
category: 'WW-WA'
label: WhatsApp contact url

If the Universal Analytics global object does not use the default name ‘ga’, you can inform to WidgetWhats about your custom global object name:

<script> window.wwwa_ga = 'my_custom_ga_name'; </script>

Google Tag Manager

A custom event is launched with the parameters:

event: 'WW-WA'
eventAction: 'click'
eventLabel: WhatsApp contact url

If your data layer object does not use the default name ‘dataLayer’, you can inform to WidgetWhats about your custom data layer name:

<script> window.wwwa_data_layer = 'my_custom_data_layer_name'; </script>

Facebook Pixel

A “Custom Event” is sent with the name 'WW-WA' and the parameters:

eventAction: 'click'
eventLabel: WhatsApp contact url 

Other integrations

WidgetWhats provides various custom events to capture and measure them or launch specific actions.

"wwwa/open"

This event is triggered before WhatsApp open. This is the most useful event for activating your custom tracking code (or other needs).

In event.details you can access to output WhatsApp url and agent telephone number.

Example for conversion of Google Ads:

<script>
document.addEventListener('wwwa/open', function(){
  gtag('event', 'conversion', {
    'send_to': 'AW-CONVERSION_ID/CONVERSION_LABEL',
    'value': 1.0,
    'currency': 'USD',
  });
});
</script>

"wwwa/loaded"

This event is triggered when WidgetWhats widget is succesfull loaded and added to your website.

In event.details you can access to widget settings.

"wwwa/popup/show"

This event is triggered on widget popup show.

"wwwa/popup/hide"

This event is triggered on widget popup hide.

Share on facebook
Share on twitter
Share on linkedin

Turn your visitors into customers.

Create a free account.

Related articles

How to add Widget WhatsApp to Elementor

If you use the visual layout for WordPress Elementor, it will be very easy to add the WidgetWhats on your website. You can follow these

How to add Widget WhatsApp to Blogger

You can use the “Add a Gadget” feature to add WidgetWhats code to your Blogger site. First of all, from the Blogger dashboard go to

How to add Widget WhatsApp to Webflow

Add custom code and scripts that apply to your entire site or individual pages. If you have a paid Webflow account or if your project has an

How to add Widget WhatsApp to Shopify website

Adding your widget to a specific page Open your website’s visual editor.Login to your Shopify website’s backend, go to Online Store and select Customize. Add Custom Content section

Categories