Want to know how many visitors actually click your WhatsApp button? Without tracking, you're flying blind — you see conversations appear in WhatsApp but have no idea which pages, campaigns, or traffic sources drove them.
This guide shows you two ways to track WhatsApp button clicks: the manual Google Tag Manager setup (works with any WhatsApp button) and a faster alternative that does it automatically.
Most businesses add a WhatsApp button to their website and forget about it. But tracking those clicks unlocks real insights:
Which pages drive conversations — Is your pricing page or homepage generating more WhatsApp chats?
Campaign attribution — Which Google Ads campaign or social post led to that WhatsApp message?
Conversion optimization — Set up WhatsApp clicks as a GA4 conversion event and optimize ad spend toward it
Retargeting — Build audiences of visitors who clicked WhatsApp but didn't convert
Without tracking, WhatsApp is a black box. With tracking, it becomes a measurable conversion channel.
This method works with any WhatsApp button — whether it's a link, a widget from a plugin, or a custom button. You'll create a trigger in GTM that fires when someone clicks a WhatsApp link.
Before you can track clicks, GTM needs to capture click data.
Open your GTM container
Go to Variables → Configure
Under Built-In Variables, enable:
Click URL
Click Text
Click ID
Click Classes
WhatsApp links always contain wa.me or web.whatsapp.com in the URL. You can use this to identify WhatsApp clicks.
Go to Triggers → New
Choose Click — Just Links as the trigger type
Select Some Link Clicks
Set the condition: Click URL → contains → wa.me
Name it "WhatsApp Click" and save
Tip: If your WhatsApp button opens
web.whatsapp.cominstead ofwa.me, add a second condition with OR logic. Or use matches RegEx with the patternwa\.me|web\.whatsapp\.comto catch both.
Now create the tag that sends the event to Google Analytics.
Go to Tags → New
Choose Google Analytics: GA4 Event
Select your GA4 Configuration tag (or enter your Measurement ID, e.g., G-XXXXXXX)
Set the event name: whatsapp_click
Optionally add event parameters:
click_url: {{Click URL}}
page_path: {{Page Path}}
Under Triggering, select the "WhatsApp Click" trigger you created
Save
Click Preview in GTM
Your website opens with the Tag Assistant connected
Click your WhatsApp button
Check that the "WhatsApp Click" tag fired in the Tag Assistant panel
In GA4, go to Admin → DebugView to confirm the whatsapp_click event appears
In GA4, go to Admin → Events
Find whatsapp_click in the list (it may take up to 24 hours to appear)
Toggle the Mark as conversion switch
Now your Facebook and Google ad campaigns can optimize for WhatsApp clicks as a conversion goal.
Widget buttons inside iframes — If your WhatsApp widget loads in an iframe (common with third-party plugins), GTM can't track clicks inside it. You'll need the widget to push events to the dataLayer instead.
Dynamic buttons — If the WhatsApp button is loaded dynamically via JavaScript, the "Just Links" trigger may not catch it. Switch to "All Elements" as the trigger type.
Multiple WhatsApp buttons — If you have WhatsApp buttons in the header, footer, and a floating widget, they all fire the same event. Add the page_path parameter to distinguish which button was clicked.
Consent management — If you use a cookie consent banner, GTM tags may not fire until the visitor accepts cookies. Make sure your consent mode configuration allows event tracking.
If the manual GTM setup feels like too much work — or you ran into the iframe/dynamic button issues — there's a simpler approach.
Boei is a website widget that includes WhatsApp and 50+ other contact channels. It automatically pushes click events to your existing analytics tools — no GTM configuration needed.
Add WhatsApp to your Boei widget (takes 30 seconds)
Toggle on Google Analytics, Google Tag Manager, Facebook Pixel, or Plausible in your widget settings
Events fire automatically — BoeiOpened when someone opens the widget, BoeiConversion when they click WhatsApp
That's it. No triggers, no variables, no tag configuration. Boei detects the analytics tools already installed on your site and sends events through them.
WhatsApp clicks, plus 50+ other channels (Telegram, Instagram DM, phone, email, live chat, and more)
Which page the click happened on
Device and location data
Conversion funnels from page view → widget open → channel click
Custom event names per channel (e.g., WhatsAppClick instead of generic BoeiConversion)
Boei plans start from $8/month with all analytics integrations included. There's a 7-day free trial with no credit card required.
Once your WhatsApp click events flow into GA4 (via either method), you can import them as Google Ads conversions:
In Google Ads, go to Goals → Conversions → New conversion action
Select Import → Google Analytics 4 properties
Select the whatsapp_click (or BoeiConversion) event
Set the conversion value and counting method
Save
Now Google Ads can optimize your campaigns to drive more WhatsApp conversations — not just page views.
You can also create audiences from WhatsApp clickers:
In GA4:
Go to Admin → Audiences → New audience
Create a custom audience where event = whatsapp_click
This audience syncs to Google Ads for retargeting
In Facebook Ads (if using Boei + Meta Pixel):
Go to Events Manager → Custom Audiences
Create an audience from the BoeiConversion event
Use it for retargeting or create a Lookalike Audience to find similar visitors
Yes. Both methods work on mobile devices. The wa.me link opens the WhatsApp app directly on mobile, and the click event fires before the redirect.
Yes. You can add a GA4 event directly via gtag('event', 'whatsapp_click') in an onclick handler on your WhatsApp link. But GTM makes it easier to manage without touching code. Alternatively, Boei sends events automatically without any manual setup.
Go to Reports → Engagement → Events and find the whatsapp_click event. You can also build custom explorations with dimensions like page path, device category, and traffic source to understand which visitors click WhatsApp.
GTM can only track that someone clicked the WhatsApp link on your website. It can't track whether they actually sent a message or had a conversation — that happens inside WhatsApp. For conversation tracking, you'd need WhatsApp Business API integration, which is a separate setup.
No. GTM loads asynchronously and the click trigger adds negligible overhead. If you use Boei, the tracking piggybacks on your existing analytics scripts, so there's no additional load.
Yes. Whether your button links to a personal WhatsApp number (wa.me/1234567890) or a WhatsApp Business number, the click tracking works the same way. The trigger matches the URL pattern regardless of the number type.
Article by
Ruben is the founder of Boei, with 12+ years of experience in conversion optimization. Former IT consultant at Ernst & Young and Accenture, where he helped product teams at Shell, ING, Rabobank, Aegon, NN, and AirFrance/KLM optimize their digital experiences. Now building tools to help businesses convert more website visitors into customers.
Get 30% more conversations and effortlessly convert them into customers.
Don't wait, experience it for free yourself!
URL
Trusted by 10,000+ businesses
Quick 5-min, no code setup
Learn how to add Facebook Messenger chat to your WordPress site. Let readers message you directly from your blog without leaving the page.
Easily add a WhatsApp chat button to your website with our step-by-step guide. Enhance communication and user engagement effortlessly.
I compared message credit systems across 8 AI chatbot platforms. See what each response actually costs on budget, mid-tier, and premium AI models.
I compared how 10 AI chatbot platforms measure training data: characters, pages, MB, and words. See normalized costs per dollar.
Discover 18 proven AI chatbot use cases across customer support, sales, e-commerce, and HR. Real examples with ROI metrics and implementation tips.