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. For a complete overview of GTM setup with Boei, see our Google Tag Manager integration page.
Why Track WhatsApp Button Clicks?
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.
Manual vs. Automatic Tracking: Quick Comparison
| Manual (GTM) | Automatic (Boei) | |
|---|---|---|
| Setup time | 20-45 minutes (variables, triggers, tags) | 2 minutes |
| Iframe buttons | Cannot track clicks inside iframes | Works natively, no iframe issues |
| Ongoing maintenance | Re-test when button markup changes | None - handled automatically |
| Data accuracy | Depends on correct trigger configuration | Pre-tested, consistent event firing |
| Multi-channel | Separate setup for each button type | WhatsApp + 50 channels tracked the same way |
Method 1: Manual Setup with Google Tag Manager
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.
Step 1: Enable Click Variables in GTM
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
Step 2: Create a Click Trigger
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.
Step 3: Create a GA4 Event Tag
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
Step 4: Test with GTM Preview Mode
- 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_clickevent appears
Step 5: Mark as a Conversion in GA4
- In GA4, go to Admin → Events
- Find
whatsapp_clickin 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.
Common Issues with the Manual Method
- 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_pathparameter 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.
Method 2: Automatic Tracking with Boei
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.
How it works:
- 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 -
BoeiOpenedwhen someone opens the widget,BoeiConversionwhen 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.
What you can track with Boei:
- 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.,
WhatsAppClickinstead of genericBoeiConversion)
Boei plans start from $19/month with all analytics integrations included. There's a 7-day free trial with no credit card required.
Setting Up WhatsApp Clicks as a Google Ads Conversion
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(orBoeiConversion) 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.
Building Retargeting Audiences
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
BoeiConversionevent - Use it for retargeting or create a Lookalike Audience to find similar visitors
FAQ
Does WhatsApp click tracking work on mobile?
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.
Can I track WhatsApp clicks without Google Tag Manager?
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.
How do I see WhatsApp click data in GA4?
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.
What's the difference between tracking link clicks vs. actual WhatsApp conversations?
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.
Will this slow down my website?
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.
Does this work with WhatsApp Business?
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.