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):
- You must have a Google Tag Manager account. If you do not have one, you can open one here: https://tagmanager.google.com/
- You must have a Google Analytics 4 account. If you do not have one, you can create one here: https://analytics.google.com/
or… import this file and we do everything for you 🙂
If you prefer to skip the step by step process, you can use this file and import it in your Google Tag Manager. The file you download here is a JSON file you need to import into your TAG MANAGER account.
To import your file go to “Admin” Section and Import container.
Once you import the file you will see the following options:
(IMPORTANT) 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
- Create variables:
- Navigate to the appropriate Workspace, open the Variables menu and click the New button:
- Create the following custom variables with Data Layer Variable, type being Version 1. These 3 categories will receive information from the widget so you can have valuable data about your users and how they convert.
- 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.
This is the data we will send to these 3 categories for you to understand the conversion and the values we give you.
- 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.
- 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 (optional)
- 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.
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):
- You must have a Google Ads account. If you do not have one, you can open one here: https://ads.google.com/
- You must have Google Analytics 4 linked with your Google Ads account. If you did not do this, follow Google’s guide as provided here: https://support.google.com/google-ads/answer/7519537?hl=en
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.
Comments are closed.