How to Track WhatsApp Button Clicks in Google Tag Manager and GA4

For many clinics and service businesses, the most valuable thing a visitor does on a page is tap the WhatsApp button. The enquiry carries on inside WhatsApp, and if that click isn’t tracked, GA4 records a page visit and misses the lead entirely.

This guide shows how we set up WhatsApp click tracking for a private clinic’s treatment page, including the one trigger condition that stopped it working and how we found it. The page path, phone number and measurement ID below are placeholders, so swap in your own.

What you need before you start

  • Access to your Google Tag Manager container
  • Your GA4 measurement ID (it starts with G-)
  • The page where your WhatsApp button lives, for example /health-screening/
  • The WhatsApp number the button links to, in international format, for example 123

1. Turn on the click variables

In Google Tag Manager, go to Variables, then Configure, and enable:

  • Click URL
  • Click Text
  • Page Path
  • Page URL

Two of these do the real work. Page Path tells GTM which page the visitor is on. Click URL tells GTM which link they clicked.

2. Create the WhatsApp click trigger

Go to Triggers, then New, and set it up like this:

SettingValue
Trigger nameClick – WhatsApp – Health Screening
Trigger typeClick – Just Links
Fire onSome Link Clicks
Condition 1Page Path equals /health-screening/
Condition 2Click URL contains 123

The trigger fires only when someone is on that page and clicks a link containing your WhatsApp number.

Why we didn’t match the whole WhatsApp link

Our first version added a third condition: Click URL contains api.whatsapp.com/send. It looked sensible, but it stopped the trigger firing. Tag Assistant showed that this exact text wasn’t in the Click URL at the moment of the click, even though the page and the phone number matched.

WhatsApp links come in different formats and can redirect. Matching the page plus your phone number is precise enough to ignore unrelated clicks, without depending on one link format.

3. Create the GA4 event tag

Go to Tags, then New, and choose Google Analytics: GA4 Event.

SettingValue
Tag nameGA4 – WhatsApp Click – Health Screening
Measurement IDG-XXXXXXXXXX
Event namewhatsapp_click
TriggerClick – WhatsApp – Health Screening

So the flow is: a visitor clicks the WhatsApp link, the trigger matches the page and number, the GA4 tag fires, and whatsapp_click is sent to GA4.

4. Test it in Preview mode

  1. Click Preview in Google Tag Manager.
  2. Enter your page URL and connect Tag Assistant.
  3. Click the WhatsApp button on the page.
  4. In Tag Assistant, select the newest Link Click event.
  5. Check that your GA4 WhatsApp tag appears under Tags Fired.

5. If the tag doesn’t fire

If Tag Assistant shows the Link Click but your tag sits under Tags Not Fired, don’t rebuild anything yet. Click the tag and look at its trigger. Tag Assistant marks each condition as passed or failed, and that tells you exactly what to fix.

In our case, the page path passed, the phone number passed, and the api.whatsapp.com/send condition failed. Removing that condition fixed it.

One thing that catches people out: Tag Assistant doesn’t re-check events that already happened. After changing a trigger, save it, reload the page, click the button again, and look at the newest Link Click. If Preview still seems to use the old trigger, restart the Preview session.

Other common reasons a WhatsApp event won’t fire:

  • The page path doesn’t exactly match the live URL, often a missing trailing slash.
  • The phone number is formatted differently in the real link.
  • The wrong trigger is attached to the tag.
  • A click variable you need hasn’t been enabled.

6. Confirm the event in GA4

  1. In GA4, open Admin, then DebugView.
  2. Keep GTM Preview connected.
  3. Click the WhatsApp button again.
  4. Look for whatsapp_click in DebugView.

If a WhatsApp click is a genuine enquiry for your business, mark whatsapp_click as a key event in GA4 so it counts in your lead and conversion reports.

Use one event name across the whole site

Keep the event name the same, whatsapp_click, on every page. GA4 already records the page, so you can see which treatment or service page produced each click without creating dozens of event names like screening_whatsapp_click or hairloss_whatsapp_click.

To track another page, copy the trigger, change the page path, and change the number if it’s different.

Checklist before you publish

  • The click shows as a Link Click in Tag Assistant.
  • The page path condition passes.
  • The phone number condition passes.
  • Your GA4 WhatsApp tag appears under Tags Fired.
  • whatsapp_click appears in GA4 DebugView.

Only then publish the container.

Frequently asked questions

How do I track WhatsApp clicks in GA4?

Create a Google Tag Manager link-click trigger for the page and your WhatsApp number, then send a GA4 event such as whatsapp_click.

Why isn’t my WhatsApp tag firing in GTM?

Usually a trigger condition is too strict, such as matching one WhatsApp link format. Check which condition fails in Tag Assistant.

Should I use one event name for WhatsApp clicks on every page?

Yes. Use whatsapp_click everywhere and use the page path in GA4 to see which page the click came from.

Can you set up tracking for us?

Yes. Our team sets up and tests tracking for WhatsApp, calls and forms in Google Tag Manager and GA4.

Need a hand with tracking?

If you’re not sure which enquiries your website is actually producing, our SEO support includes setting up and checking tracking for calls, forms and WhatsApp. Book a call and we’ll take a look.

Keep reading