top of page
  • Writer's pictureKelly Alica Liman

How to Track WhatsApp Clicks in Google Analytics 4 (GA4)

If you're here in this article, odds are you already have a WhatsApp account linked to your website where visitors can start a conversation. Now, you might be wondering if you can track how many website visitors clicked and go to the WhatsApp link. Well, you're in the right place, as this guide will show you a step-by-step tutorial (with screenshots) on how to track WhatsApp Clicks in Google Analytics 4!


Looking for help or support on Google Analytics 4?


In case you find video tutorials easier to digest, here's one you can check out from XYZ Lab's Youtube Channel!

Topics Covered:


What you need to get started to track WhatsApp Clicks in Google Analytics 4

In this article, we will show you how to register an event that is going to track how many times a user that comes to your website clicks to go to WhatsApp and start a conversation. Now, before we get started, there are some prerequisites and tools that you need to prepare.

Prerequisite 1: Make sure your GA4 account is correctly set up on all website pages

In case you haven't already, you can check out the Google Analytics 4 Tutorial here to set up your account. For the purpose of this tutorial, we will be using the Google Merchandise Store's demo account as an example.

Prerequisite 2: Set up a Google Tag Manager account

You can head on to and follow this Google Tag Manager Tutorial to set up an account and a container. For the purpose of this tutorial, we will be using this Mindful Camp account linked to The Mindful Camp website above as an example.

Prerequisite 3: Install your Google Tag Manager Container on all website pages

We have covered these steps in a previous tutorial which you can find here: Youtube Tutorial and Article Guide (Step 1). Otherwise, you can also follow the steps below to install the Google Tag Manager Container on all website pages:

1. Click on Admin and select Install Google Tag Manager.

2. Copy the tracking codes and install them on every single page of your website.

Once it's done and your GTM is installed, we can start setting up the WhatsApp tracking!

How to track WhatsApp Clicks in Google Analytics 4

Step 1: Enable all Click Variables and Publish your Tag Manager

We have covered these steps in a previous tutorial which you can find here: Youtube Tutorial and Article Guide (Step 3). Otherwise, you can also follow the steps below to enable the click variables on Google Tag Manager:

1. Access Google Tag Manager.

2. Click Variables.

3. Click Configure.

4. Scroll down and find Clicks. Enable all the options that are relevant to Clicks (all Clicks variables).

5. Submit and Publish the changes.

Step 2: Set up the Tag

1. Navigate to your GTM account. Click on Tag.

2. Name the Tag.

3. Click on Tag Configuration.

4. Select the tag type: Google Analytics: GA4 Event.

Step 3: Provide your GA4 Measurement ID

1. If it's your first time setting up, you will have to Manually Set ID and provide your GA4 Measurement ID.

2. Navigate to your GA4 Account. Click on Admin.

3. Navigate to Property (second column). Click on Data Streams.

4. Click on your property.

5. Copy the Measurement ID.

6. Paste the Measurement ID.

Step 4: Name your Event

Name the event accordingly, as it will show up in the GA4 reports. Do not add a space in between and always use an underscore like so: action_name (e.g. whatsapp_clicks).

This is how it will appear in the GA4 reports:

Step 5: Create a new Trigger

Triggering determines when the tool is going to be active on the website. To configure the trigger:

1. Click on Triggering

2. Click + symbol to create a new trigger.

3. Name the trigger.

Step 6: Select "Just Links" for trigger type

Click on Trigger Configuration and select Just Links for the trigger type.

The Just Links trigger type is used to track an event that corresponds to an external URL (user clicks and leaves to an external URL). We use Just Links because if the user comes to the website and clicks on the link, they are directed to an external WhatsApp page.

Step 7: Select "Some Link Clicks" for Trigger Configuration

Since we want to track the specific click that links to a specific WhatsApp page, we don't want to track All Link Clicks but only Some Link Clicks.

Step 8: Select "Click URL" from the dropdown menu

Click URL is the specific URL that the user will get redirected to after they click the button.

Step 9: Paste the Link Address (WhatsApp URL)

1. Copy the link address (WhatsApp URL). You can copy the entire URL or only a partial URL (e.g. only the

2. Paste the link address (WhatsApp) URL in the box.

Notice that there is a dropdown option for the conditions. You can do a Click URL equals [complete link address], which means it will only get triggered if the specific URL is visited. Or Click URL contains [partial link address], which means it will be triggered if any link that contains the partial link address is visited. Both work largely the same and you can choose the method that suits you.

Step 10: Save the Tag Configuration

This is how the completed Trigger Configuration should look like. This is how we define a unique click and tell the system that we want to track the specific click. The Tag will only send information back to Google Analytics when someone clicks on a button with the exact parameter we have set up. Don't forget to save the tag configuration.

In this case, we have created a GA4 event with the name WhatsApp Clicks that will live in the specific GA4 stream, and it will only be triggered when a user clicks on a link that goes to the specific URL (WhatsApp URL).

Step 11: Submit and Publish Container

How to verify that the Event setup is correct

Step 12: Preview your Tag Manager

Step 13: Connect Tag Assistant to your website

Two tabs will automatically open:

1. Tag Assistant

2. Website connected to the Tag Assitant (debugger view)

Step 14: Click on the link you want to track on the debugger view

Step 15: Navigate to Tag Assistant and select the Link Click instance relevant to your outbound click

We can see the new instance of the link click on the sequence. Click on the recent Link Click.

Step 16: Check if your Tag is firing correctly

Here we can see the tags fired, including the GA4 event we just set up and tested which is called WhatsApp Click.

Click on the WhatsApp Clicks Tag. It will show the details of why the tag was fired. You can see here that the tag is fired because a user clicked on an element that contains the specific Click URL, which means the event is working as expected.

Step 17: Publish your Tag Manager

And you're done! To note, it might take 24 hours for the event to start functioning properly and show up in your GA4 account.


For some final words, keep in mind that we can only track clicks from the website to a specific WhatsApp Start a Conversation page. We cannot track beyond that page as to when a user actually clicks Continue to Chat and begin typing a message. This is because it is a URL that belongs to WhatsApp and does not belong to our business. As such, we can only measure how many people come to our website and when they click on the WhatsApp URL to your WhatsApp profile, but not if they actually did continue to start a chat.

Nevertheless, it is still important and useful to track WhatsApp Clicks to check whether users are interested in initiating a conversation with your business when they reach your website, so we hope this guide has helped you in setting it up effortlessly!

2 תגובות

Carlos Lluberes Dalealaweb
Carlos Lluberes Dalealaweb
31 בינו׳ 2023

Hello! This works great for Clicks produced by Desktop users. But I just noticed, that when the user is in Mobile, the browser may open directly the Whatsapp App, and the event is not triggered. Do you any way to measure this scenario?

Alonso Pérez Mendoza
Alonso Pérez Mendoza
17 במאי 2023
בתשובה לפוסט של

Hi, did you found a solution?

bottom of page