How to Track WhatsApp Link Clicks Using Google Tag Manager and GA4
WhatsApp link tracking helps you measure how many visitors click WhatsApp links on your website using Google Tag Manager (GTM) and Google Analytics 4 (GA4).

WhatsApp has become an important communication channel for businesses. Many websites use WhatsApp buttons to help visitors ask questions, request product details, book appointments or contact a sales team.
But how do you know whether visitors are actually clicking those buttons?
This is where WhatsApp link tracking becomes useful. By combining Google Tag Manager (GTM) with Google Analytics 4 (GA4), you can track WhatsApp button clicks and understand how visitors interact with your website.
In this guide, we’ll walk through the complete setup, from enabling click variables in Google Tag Manager to checking the event in GA4.
What Is WhatsApp Link Tracking?
WhatsApp link tracking is the process of recording when a visitor clicks a WhatsApp link or button on your website.
For example, a business might have a button saying “Chat with us on WhatsApp”. When a visitor clicks it, they are redirected to WhatsApp.
By tracking this interaction, you can measure how many visitors show interest in contacting your business.
You can use this information to:
- Measure clicks on WhatsApp contact buttons.
- Understand which website pages generate more enquiries.
- Compare engagement across different landing pages.
- Analyse how visitors interact with your website.
- Use the data to improve your marketing campaigns.
Important: Tracking a WhatsApp click does not automatically tell you whether the visitor sent a message or became a customer. It records the click on your website, not the completed conversation.
Tools Required
Before starting, make sure you have access to the following:
- Google Tag Manager: Used to configure click triggers and send tracking events.
- Google Analytics 4: Used to collect and analyse website interaction data.
- Your WordPress website: The website where your WhatsApp button or link is installed.
You should already have a Google tag or GA4 configuration connected to your website through GTM.
Step 1: Check Your WhatsApp Link for Tracking
First, open your website and locate the WhatsApp contact button.
Right-click the button and inspect its link, or use your browser’s developer tools to check the link destination.
Common WhatsApp link formats include:
https://wa.me/919876543210https://api.whatsapp.com/send?phone=919876543210https://web.whatsapp.com/
Your website may use a different format depending on the WhatsApp plugin or button implementation.
Make a note of the link format. We’ll use it to create the trigger in Google Tag Manager.
Step 2: Enable Click Variables in Google Tag Manager
Log in to your Google Tag Manager account and open the container connected to your website.
- Go to Variables in the left-hand menu.
- Find the section called Built-In Variables.
- Click Configure.
- Enable the following variables:
- Click URL
- Click Text
- Click Classes
- Click ID
- Page URL
These variables help GTM identify which link a visitor clicked and the page where the interaction happened.

Step 3: Create a WhatsApp Click Trigger
Now we need to tell Google Tag Manager when it should fire the tracking event.
- Open Triggers in Google Tag Manager.
- Click New.
- Give the trigger a name:
WhatsApp Link Click. - Select Just Links as the trigger type.
- Under This trigger fires on, select Some Link Clicks.
- Choose Click URL as the variable.
- Select matches RegEx as the condition.
- Enter the following expression:
wa\.me|api\.whatsapp\.com|web\.whatsapp\.com
- Save the trigger.
This setup identifies clicks on links matching these WhatsApp domains.
Note: This trigger works for normal clickable links. If your WhatsApp button is created using a JavaScript button or another element without a standard link, a Just Links trigger may not detect it. In that case, inspect the button and consider an All Elements click trigger using a suitable CSS selector or another reliable identifier.

Step 4: Create a GA4 Event Tag
Once the trigger is ready, we need to send the click information to Google Analytics 4.
- Open Tags in Google Tag Manager.
- Click New.
- Name the tag
GA4 - WhatsApp Click. - Select Google Analytics: GA4 Event as the tag type, if available in your GTM interface.
- Select your existing Google tag or GA4 configuration.
- Enter the event name:
whatsapp_click
Add these event parameters:
| Parameter name | Value |
|---|---|
| link_url | {{Click URL}} |
| link_text | {{Click Text}} |
| page_location | {{Page URL}} |
- Under Triggering, select
WhatsApp Link Click. - Save the tag.
If your GTM interface uses the newer Google tag setup, select the appropriate Google tag and add the GA4 event tag using that configuration. Do not create a duplicate Google tag if one is already installed.

Step 5: Test the Tracking Setup
Before publishing the changes, test whether the event fires correctly.
- In Google Tag Manager, click Preview.
- Enter your website URL.
- Click Connect to open your website in Tag Assistant.
- Locate the WhatsApp button.
- Click it.
- Return to Tag Assistant.
- Check whether the
GA4 - WhatsApp Clicktag fired.
If the tag fires, GTM has detected the click and attempted to send the event.
If it does not fire, check the trigger condition and the actual WhatsApp link destination. Also confirm that the button uses a standard link if you selected Just Links.
Step 6: Verify the Event in GA4
Now open your Google Analytics 4 property.
- Go to Admin or the relevant reporting area in GA4.
- Open DebugView while your test session is in debug mode.
- Look for the event named
whatsapp_click. - Select the event to inspect its available parameters.
You can also check the Realtime report to see whether the event appears during your test.
The event may take some time to appear in standard reports. DebugView is generally more useful for immediate testing.

Step 7: Mark WhatsApp Clicks as a Key Event (Optional)
If WhatsApp enquiries are important to your business, you may want to treat a click as a meaningful conversion indicator.
In GA4:
- Open Admin.
- Find Events or Key events, depending on your interface.
- Locate
whatsapp_clickafter GA4 has received it. - Mark it as a key event if it represents an important action for your reporting.
Remember that a WhatsApp click is an indicator of interest, not proof of a completed enquiry or sale. If you need to measure actual leads, you will need a separate way to confirm completed conversations or qualified enquiries.
Common Problems with WhatsApp Link Tracking
1. WhatsApp click event is not firing
Check whether the button uses a normal link and whether its destination matches your trigger conditions.
2. Click URL variable is empty
Make sure Click URL is enabled under Built-In Variables. If the button is not a link, a different trigger approach may be necessary.
3. Event is not visible in GA4
Check the Google tag configuration, GTM preview mode and GA4 DebugView. Also consider consent settings, browser extensions and ad blockers.
4. Duplicate events are being recorded
Check whether multiple GTM tags or website plugins are tracking the same WhatsApp interaction. Avoid installing duplicate tracking implementations.
Final Thoughts
Tracking WhatsApp clicks can help businesses understand how visitors interact with their websites and which pages encourage people to get in touch.
With Google Tag Manager and GA4, you can create a custom whatsapp_click event without manually adding tracking code to every WhatsApp button.
The most important part is to test the setup before publishing it and make sure the event is recording the correct interactions.
If you’re learning Google Analytics 4 or Google Tag Manager, this is a useful practical tracking setup to understand and implement.
Have you set up WhatsApp click tracking on your website? Share your experience or questions in the comments.


