This guide assumes you are integrating with Google Analytics 4 and already have Configuration tag set up for it.

ChatWith widget can send interaction events to the data layer. You can capture these using Google Tag Manager and forward them to Google’s Analytics 4. Please follow the steps below to achieve proper tracking.

Prerequisite(s):

If you prefer to skip the step by step process, you can use this file and import it in your Google Tag Manager. Then update the GA4 configuration tag to utilize your Google Analytics 4 stream ID as such:

Steps to track your Google Ads with your WhatsApp Widget

  1. Create variables:
    1. Navigate to the appropriate Workspace, open the Variables menu and click the New button: 
  1. Create the following custom variables with Data Layer Variable, type being Version 1:
    • cw_event_category
  • cw_event_action 
  • cw_event_label 

Note: Please copy and paste Data Layer Variable names as provided in this guide. These are case-sensitive. If you fail to do so, your tracking will not work.

  1. Create a trigger:

a) Navigate to the Triggers menu and click the New button: 

b) Create the following Custom Event trigger with the event name chatwith

Note: Please copy and paste the Event name as provided in this guide. These are case-sensitive. If you fail to do so, your tracking will not work.

  1. Create a tag:

a) Navigate to the Tags menu and click the New button:

b) Select the tag type Google Analytics: GA4 Event: 

c) In this step, you have the liberty to customize things. You can name the event as you like, as well as the variable fields. The below is just our suggestion.

Enter the event name as “chatwith”. Then create and populate three variable fields. For their values, use the Category/Action/Label variables created in step 1. See what our suggested setup looks like: 

Note: If you have named the variables the same as in our images, you can overwrite the naming from the image in the value fields. Otherwise, please use your names. The most certain way to add the variables is by clicking on the plus sign next to each item and selecting the variable you need: 

or by typing “{{“ and then, a dropdown will appear with the list of variables that you have, so you can click on the one you need.

d) Set a trigger created in step 2 for the tag:

Don’t forget to publish your changes to GTM container after testing by pressing the Submit button. You are done. Good luck!


Advanced options for Google Ads and WhatsApp leads

  1. Multiple chat conversion tracking

By default, we track all chats under a single event called chatwith. In case you would like to track different chats as separate events, you can customize the event label within the chat settings. In our example, we shall name the chats english-customers and spanish-customers

The value you enter here will appear as the value of the cw_event_label variable when users interact with the chat. This means you can make triggers in GTM that reference a specific chat instead of all chats at once. See how the triggers for our examples would look like in the following images:

and


Conversion tracking in GA4 | WhatsApp leads

Google Analytics 4 can take up to 24 hours to process the events. After this period, the event will appear in the event list. You can activate them to be tracked as Key Events (formerly Conversions) by navigating to Admin

then Events under Data Display

and then moving the slider to active:

You can then navigate to the next menu below, called Key Events and the activated event should display there: 

. You can edit the counting method or assign a monetary value in this page as well.

  1. Conversion import to Google Ads

In case you want to track your paid campaigns and measure their success by the event in Google Ads, you can import conversions from GA4.

Prerequisite(s):

To import conversion from a linked GA4 account, follow this guide from Google: https://support.google.com/google-ads/answer/2375435?sjid=15649076413842924432-EU

You can then link the relevant ChatWith event with your campaign through account defaults or setting campaign-specific goals.

For Google’s old product (Universal Analytics), follow our other guide.

2 - 0

Thank You For Your Vote!

Sorry You have Already Voted!

By Chatwith

We help small businesses using our WhatsApp tools to expand their businesses.