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.

Turn your visitors into customers.

Create a free account.

Categories