Skip to content
All articles
July 11, 2026·4 min read

How to Track WhatsApp Button Clicks From Your Business Website in GA4

A practical guide to setting up a GA4 event for WhatsApp clicks and finding out which page each conversation starts from.

If most of your customers reach you on WhatsApp, you have a measurement blind spot: Google Analytics shows you visits, maybe a form, but the WhatsApp button stays a black box. You don't know how many people tap it, from which page, or whether the floating button beats the link on your contact page.

The good news: WhatsApp clicks can be tracked cleanly in GA4, in a few minutes, at no extra cost. The honest part: you're measuring intent (someone tapped), not the conversation itself — WhatsApp doesn't send back to GA4 what was actually said. In this guide I'll show three methods (from no-code to Tag Manager), how to mark the click as a key event, and a simple trick to learn which page each lead came from.

First, be clear about what you're measuring: a click is not a conversation

The WhatsApp button on your site is technically a link to wa.me/407xxxxxxxx or api.whatsapp.com/send. When someone taps it, the browser opens the app or WhatsApp Web. GA4 can record the tap, but it can't see whether the person actually sent a message or what they wrote.

So what you get is a strong intent signal: how many people took the step toward a conversation, and from which page. That's exactly the metric you need to compare pages, campaigns, and button placements.

If you want to tie the click to the real conversation, you need something else (a pre-filled message carrying the source, or the WhatsApp Business API) — I'll come back to the pre-filled message below, because it's the simplest and most useful.

The no-code way: turn the outbound click into a GA4 event

GA4 usually has Enhanced Measurement enabled, which automatically records clicks on external links as a `click` event with a `link_url` parameter. wa.me is an external domain, so the taps already show up there — just mixed in with every other outbound link.

To isolate them:

  • Go to Admin → Events → Create event.
  • Create a new event, e.g. `whatsapp_click`.
  • Condition: `event_name` equals `click` AND `link_url` contains `wa.me` (or `whatsapp`).

From now on, every WhatsApp tap also generates your clean, easy-to-report event. First check under Admin → Data display → Events that the `click` event really shows up with the WhatsApp link_url.

The clean way with Google Tag Manager

If you already use Google Tag Manager, you get more control and don't depend on Enhanced Measurement.

  • In GTM create a trigger of type "Click - Just Links", with the condition `Click URL` contains `wa.me`.
  • Add a Google Analytics: GA4 Event tag with your property's measurement ID.
  • Event name: `whatsapp_click`.
  • Send useful parameters too: `page_location` (the page it was tapped from) and, if you can, a custom parameter like `button_position` with a value of "floating" or "contact".

The upside: you also catch buttons that aren't classic links (e.g. a JavaScript button), you can add custom parameters, and you can test everything in GTM's Preview mode before publishing.

The direct-code way: gtag on onclick

If you have access to the site code and GA4 is already installed via gtag.js, you can fire the event straight from the button, no GTM:

`onclick="gtag('event', 'whatsapp_click', {button_position: 'floating'});"`

Put this on each WhatsApp button/link and give each a different `button_position` value — floating, hero, contact, footer. That's how you see in reports which placement earns the most taps.

Watch one detail: on mobile, the tap immediately opens the WhatsApp app, and the navigation can cut off the event. With modern gtag.js and `transport_type: 'beacon'` (the GA4 default) the risk is small, but it's worth confirming in DebugView that the event actually fires before the page changes.

Mark it as a key event and verify in DebugView

A recorded event means little unless you treat it as a business goal.

  • In Admin → Events, find `whatsapp_click` and flip on the "Mark as key event" toggle (formerly "conversion").
  • That puts it in your conversion reports and lets you tie it to Google Ads campaigns later, if you ever run them.

Before anything else, test. Open GA4 → Admin → DebugView, visit the site with the Google Tag Assistant extension active (or GTM's Preview mode) and tap the WhatsApp button. You should see `whatsapp_click` appear in real time, with your parameters. If it doesn't, the problem is almost always in the trigger condition (wrong URL) or in Enhanced Measurement being off.

The trick that tells you which page the lead came from

GA4 shows you how many clicks and from where. But inside WhatsApp, messages all pile up together and you can't tell who wrote from which page. The fix isn't in GA4 — it's in the link: add a different pre-filled message on each page.

For example, the link on your pricing page:

`https://wa.me/407xxxxxxxx?text=Hi!%20I%20saw%20your%20packages%20and%20want%20details`

And the one in your blog, different text. When the customer writes, you see right in the conversation where they came from — a free "tag" that perfectly complements the GA4 data.

If you'd rather have the whole setup (correct button, GA4 events, pre-filled messages per page) done properly and remotely, at MPO Web Studio we prepare a free demo of your site before you pay anything. Message us on WhatsApp and we'll show you exactly how the tracking would look for your case.

Frequently asked questions

Can I see the actual conversation in GA4, not just the click?+

No. GA4 measures the button tap (intent), but has no access to what happens inside WhatsApp. To tie a click to a real conversation, use different pre-filled messages per page or, for high volume, the WhatsApp Business API with a CRM.

Do I need a Google Ads account for this to work?+

No. Everything is done in GA4 (and optionally Google Tag Manager), both free. You only need Ads if you later want to optimize paid campaigns based on these clicks.

What's the difference between wa.me and api.whatsapp.com for tracking?+

For tracking it doesn't matter — both are external links you can catch by domain. Just make sure your trigger condition uses the exact domain from your button (wa.me or api.whatsapp.com).

On mobile the button opens the app directly. Is the click still recorded?+

Usually yes, because GA4 sends events via the "beacon" method, which survives the page change. Still, confirm in DebugView by tapping the button on your phone, to be sure the event fires before the app opens.

Do I need cookie consent to measure this?+

GA4 uses cookies, so clicks are only counted for visitors who accepted analytics in your consent banner. That's normal and GDPR-correct; you'll see the clicks of those who accepted, not everyone.

Free guide

7 mistakes that drive clients away from your website

Leave your email and get the guide right here, instantly. No spam.

By submitting, you agree to the Privacy Policy.
MEchipa MPOWe reply personally

Want to see what your business's website could look like?

Message us on WhatsApp and we'll build you a free demo website with your business name on it. See it first, then decide — no strings attached.

Ask for a free demo websiteWe usually reply within a few minutes