How to Track WhatsApp Link Clicks Using Google Tag Manager and GA4

By Anubhav Verma
WhatsApp link tracking using Google Tag Manager and GA4

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 link tracking process using Google Tag Manager and 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:

  1. Google Tag Manager: Used to configure click triggers and send tracking events.
  2. Google Analytics 4: Used to collect and analyse website interaction data.
  3. 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/919876543210
  • https://api.whatsapp.com/send?phone=919876543210
  • https://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.

  1. Go to Variables in the left-hand menu.
  2. Find the section called Built-In Variables.
  3. Click Configure.
  4. 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.

Google Tag Manager built-in click variables configuration

Step 3: Create a WhatsApp Click Trigger

Now we need to tell Google Tag Manager when it should fire the tracking event.

  1. Open Triggers in Google Tag Manager.
  2. Click New.
  3. Give the trigger a name: WhatsApp Link Click.
  4. Select Just Links as the trigger type.
  5. Under This trigger fires on, select Some Link Clicks.
  6. Choose Click URL as the variable.
  7. Select matches RegEx as the condition.
  8. Enter the following expression:

wa\.me|api\.whatsapp\.com|web\.whatsapp\.com

  1. 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.

WhatsApp link click trigger configuration in Google Tag Manager

Step 4: Create a GA4 Event Tag

Once the trigger is ready, we need to send the click information to Google Analytics 4.

  1. Open Tags in Google Tag Manager.
  2. Click New.
  3. Name the tag GA4 - WhatsApp Click.
  4. Select Google Analytics: GA4 Event as the tag type, if available in your GTM interface.
  5. Select your existing Google tag or GA4 configuration.
  6. Enter the event name:

whatsapp_click

Add these event parameters:

Parameter nameValue
link_url{{Click URL}}
link_text{{Click Text}}
page_location{{Page URL}}
  1. Under Triggering, select WhatsApp Link Click.
  2. 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.

GA4 whatsapp_click event tag setup in Google Tag Manager

Step 5: Test the Tracking Setup

Before publishing the changes, test whether the event fires correctly.

  1. In Google Tag Manager, click Preview.
  2. Enter your website URL.
  3. Click Connect to open your website in Tag Assistant.
  4. Locate the WhatsApp button.
  5. Click it.
  6. Return to Tag Assistant.
  7. Check whether the GA4 - WhatsApp Click tag 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.

  1. Go to Admin or the relevant reporting area in GA4.
  2. Open DebugView while your test session is in debug mode.
  3. Look for the event named whatsapp_click.
  4. 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.

WhatsApp click event appearing in Google Analytics 4 DebugView

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:

  1. Open Admin.
  2. Find Events or Key events, depending on your interface.
  3. Locate whatsapp_click after GA4 has received it.
  4. 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.

Related articles

Meta Ads case study infographic showing clicks increasing from 678 to 1,310 and CPC falling from ₹1.18 to ₹0.55.

How I Cut Meta Ads CPC by 53% for a D2C Apparel Store: A Case Study

By Anubhav VermaMeta Ads CPC reduction case study explains how my team worked on a seven-day campaign for Unleavables, a D2C apparel brand. The campaign generated 1,310 clicks at approximately ₹0.55 per click, reducing CPC by around 53% compared with our estimate. The brand sells T-shirts, crop tops and hoodies featuring quirky designs around themes such as cats, dogs, travel and coffee. For our project, we were assigned the cat lovers theme, with a specific focus on audiences in Hyderabad and Kolkata. We planned a seven-day Meta Ads campaign with an estimated budget of ₹800. Our media plan predicted around 678 clicks at an estimated CPC of ₹1.18. The actual results were quite different. We generated 1,310 link clicks at approximately ₹0.55 per click, reducing CPC by around 53% compared with our estimate. In this article, I’ll walk you through how we planned the campaign, selected our audiences, created the ads, made optimisation decisions and analysed the results. 1. Meta Ads CPC Reduction: Understanding the Brand and Campaign Objective Before setting up the campaign, we looked at the brand and the products it offered. Unleavables focuses on expressive and casual apparel. Its product designs are aimed at people who enjoy showing their interests and personalities through what they wear. For our project, the assigned theme was cat lovers. Rather than promoting the entire product catalogue to a broad audience, we decided to focus on people who had an interest in cats and were also likely to shop for clothing online. Our main objective was straightforward: drive visitors to the Unleavables website. Here was the campaign brief: Campaign Detail Information Brand Unleavables Business Type D2C Apparel Platform Meta Ads Campaign Objective Traffic Performance Goal Landing Page Views Target Audience Cat Lovers Locations Hyderabad and Kolkata Duration 7 Days We selected Landing Page Views as our performance goal because we wanted to understand how many people actually reached the website after clicking an ad. 2. Planning the Audience Targeting One thing I wanted to avoid was showing the same advertisement to everyone. Someone interested in cats might not automatically be interested in buying a T-shirt. We therefore combined cat-related interests with shopping and fashion interests to make the targeting more relevant. We created two ad sets to compare different audience types. Ad Set 1: Core Audience The first ad set focused on people interested in cats, clothing and online shopping. Our targeting included: We also kept Advantage+ Audience turned off for this ad set. The idea was to reach people who had both an interest in shopping and a connection with the cat theme. Ad Set 2: Custom and Lookalike Audience For the second ad set, we wanted to test audiences based on previous interactions with the brand. We used available audience sources such as: We also created 1% lookalike audiences from available custom audience sources. This gave us an opportunity to compare interest-based targeting with audiences built around previous interactions. Budget Distribution We initially planned to divide the ₹800 budget between the two ad sets. Ad Set Budget Share Planned Amount Core Audience 70% ₹560 Custom and Lookalike 30% ₹240 We allocated more budget to the core audience because the campaign was focused on reaching new potential customers. 3. Creating Ads That Matched the Audience Once the audience strategy was ready, the next step was deciding how to present the products. We selected the Carousel Ad format because it allowed us to showcase multiple cat-themed T-shirt designs in one advertisement. Instead of focusing on a single product, people could explore different designs while scrolling through the carousel. We also used different messaging for our two ad sets. Ad Copy for the Core Audience Our first ad used a playful approach to connect with cat lovers. Primary Text: “Cat Lovers Only! 🐱📢 Are you obsessed with cats? We’ve got the purrfect tees for you! Explore our adorable cat-themed collection now and get ready to paw-ty in style!” Headline: It’s Raining Cats Description: Cute Cat T-shirts by Unleavables CTA: Learn More Ad Copy for the Custom and Lookalike Audience For the second ad set, we used more direct product-focused messaging. Primary Text: “Unleavables brings to you cute ‘cat’ themed T-shirts. Grab one in a cool color of your choice. Hurry Up before it’s gone. 😻😻😻” Headline: It’s Raining Cats Description: Cute Cat T-shirts CTA: Shop Now The main idea was to keep the message relevant to the products and the interests of the people we were targeting. 4. Setting Up the Meta Ads Campaign After finalising the audience and creatives, we moved on to the campaign setup. Here are the main settings we selected: Setting Selection Campaign Objective Traffic Performance Goal Landing Page Views Bid Strategy Highest Volume Delivery Standard Delivery Placements Automatic Placements Ad Format Carousel We selected Highest Volume as our bid strategy and used automatic placements. The campaign was planned for seven days, with an estimated total budget of ₹800. Our Meta Ads CPC reduction strategy focused on reaching relevant audiences while keeping campaign costs under control. For more information about Meta advertising tools and campaign setup, you can refer to the official Meta Business Help Centre. 5. Campaign Optimisation: What We Changed During the Campaign Setting up a campaign is only the beginning. Monitoring its performance and making adjustments are equally important. During this project, two changes stood out. Day 4: Adding a Custom and Lookalike Audience On the fourth day, we introduced the custom and lookalike audience ad set. We wanted to see how people who had previously interacted with the brand or its digital properties would respond to the advertisements. However, the available audience pool was relatively small because the brand had limited social media followers and previous website visitors. As a result, this ad set had less reach and needed more time to gather useful performance data. Day 7: Increasing the Core Audience Budget By the seventh day, the core audience was generating more clicks and overall results. We had some budget remaining, so we

Read article
12 ChatGPT prompts for Facebook Ads covering campaign strategy, audience research, ad copy, creative ideas, optimisation and performance reporting.

12 ChatGPT Prompts for Facebook Ads to Improve Your Ad Campaigns

ChatGPT prompts for Facebook Ads can help marketers create ad copy, explore creative ideas, research audiences and improve campaign planning. Running Facebook and Instagram ads involves more than selecting an audience and setting a budget. You need to understand your customers, develop creative ideas, write compelling ad copy and regularly analyse campaign performance. This is where ChatGPT can be a useful assistant for digital marketers and business owners. With the right instructions, ChatGPT can help you brainstorm campaign ideas, write different versions of ad copy, develop creative concepts and organise your optimisation process. In this guide, you’ll find 12 practical ChatGPT prompts for Facebook Ads that you can adapt to your own campaigns. Whether you’re a beginner, freelancer or experienced performance marketer, these examples can help make your advertising workflow more organised. How Can ChatGPT Help With Facebook Ads? ChatGPT can support different stages of Meta advertising, from campaign planning to performance analysis. Here are some practical applications: Remember that ChatGPT is an assistant, not a replacement for Meta Ads Manager or your own marketing judgement. Always review its suggestions before using them in live campaigns. How to Write Effective ChatGPT Prompts for Facebook Ads The quality of ChatGPT’s response depends heavily on the information you provide. A vague instruction such as “Write a Facebook ad for my business” may produce generic copy. Instead, provide context about your business, product, target audience, campaign objective and preferred tone. A useful prompt generally includes: Now let’s look at 12 prompts you can use in your advertising workflow. 12 ChatGPT Prompts for Facebook Ads 1. Prompt for Facebook Ads Campaign Strategy Before launching a campaign, you need a clear plan. This prompt can help organise your initial advertising strategy. Copy and use this prompt: Act as an experienced performance marketing strategist. My business sells [product or service] to [target audience]. My monthly advertising budget is [budget], and my primary objective is [sales/leads/website traffic]. Develop a Facebook and Instagram advertising strategy. Include the recommended campaign objective, campaign structure, audience approach, creative formats, budget allocation and key performance indicators. Explain your recommendations in a practical, beginner-friendly format. When to use it: During the initial planning stage, before creating your campaigns. 2. Prompt for Facebook Ads Audience Research Choosing the right audience is an important part of campaign planning. Use this prompt to brainstorm potential audience segments. Copy and use this prompt: Act as a Meta Ads audience research specialist. My business sells [product or service]. My ideal customers are [customer description]. Suggest 5 potential audience segments based on customer needs, interests, behaviours and buying motivations. For each segment, explain why it may be relevant and suggest suitable messaging. Separate your suggestions into prospecting and retargeting audiences where appropriate. When to use it: When researching audience ideas before setting up an ad set. Note: Treat the suggestions as research ideas, not guaranteed targeting options. Check which audience controls and targeting options are currently available in Meta Ads Manager. 3. Prompt for Facebook Ads Primary Text Your primary text should communicate the product’s value and give people a reason to take action. Copy and use this prompt: Act as a professional Facebook Ads copywriter. My brand is [brand name], and I sell [product or service]. The main benefit is [key benefit]. My target audience is [audience]. Write 5 different primary text variations for a Facebook and Instagram advertising campaign. Use different approaches, such as problem-solution, benefit-focused, emotional appeal, storytelling and direct response. Keep the language natural, engaging and easy to understand. Avoid unsupported claims. When to use it: When you need multiple versions of primary text to test different messaging angles. 4. Prompt for Facebook Ads Headlines A headline should quickly communicate the main value of your offer. Copy and use this prompt: Act as a direct-response advertising copywriter. My product is [product name], and its main selling point is [unique selling point]. My target audience is [audience]. Generate 10 short Facebook Ads headlines. Make them clear, relevant and benefit-focused. Avoid clickbait, exaggerated claims and unnecessary words. When to use it: When developing headline variations for your advertisements. 5. Prompt for Facebook Ad Creative Ideas A strong creative concept can help communicate your message more effectively. Copy and use this prompt: Act as a creative strategist specialising in Meta Ads. My business sells [product or service] to [target audience]. My campaign objective is [objective]. Suggest 10 different ad creative concepts for Facebook and Instagram. Include the visual idea, main message, suggested format (static image, carousel or video) and the reason each concept may appeal to the audience. Make the ideas practical to produce with a small marketing budget. When to use it: When planning new creative concepts or refreshing existing advertisements. 6. Prompt for Facebook and Instagram Video Ad Scripts Short-form video can be useful for demonstrating products and communicating offers. Copy and use this prompt: Act as a short-form video advertising scriptwriter. My brand sells [product or service], and my target audience is [audience]. Create three 20–30 second video ad scripts for Facebook Reels and Instagram Reels. Each script should include an opening hook, the main product benefit, a supporting message and a clear call to action. Suggest simple visuals and on-screen text for each scene. Keep the scripts natural and suitable for mobile viewing. When to use it: When planning video advertisements and short-form creative content. 7. Prompt for Facebook Ads A/B Testing Testing different creative and messaging approaches can help you understand what resonates with your audience. Copy and use this prompt: Act as a performance marketing analyst. I am running a Meta Ads campaign for [product or service]. My campaign objective is [objective]. I want to test different advertising approaches. Suggest an A/B testing plan covering primary text, headlines, creative formats and calls to action. Explain what should be tested, what should remain consistent, which metrics should be monitored and how to evaluate the results. Avoid recommending too many simultaneous changes. When to use it: When planning structured creative and messaging tests.

Read article