Which ad brought that WhatsApp lead? Tracking from UTM to CRM in four links

Laptop with a pink analytics dashboard among reports

To know which ad produced a WhatsApp sale, connect four links: tag every link with UTM parameters, record the WhatsApp button click as an event in GA4, put a short reference code into the prefilled message of the wa.me link, and copy that code into the CRM deal. For click-to-WhatsApp ads on the WhatsApp Business Platform, Meta adds a click ID (ctwa_clid) to the first message, and you can send Purchase or QualifiedLead events back through the Conversions API for Business Messaging. The WhatsApp Business app on a phone doesn't expose that ID, so the reference code is your fallback.

Key facts

FactValueSource
UTM valuesCase sensitive: google ≠ Googlesupport.google.com
Prefilled WhatsApp messagewa.me/<number>?text=<url-encoded text>faq.whatsapp.com
Click ID from click-to-WhatsApp adsctwa_clid, in the first inbound message webhook (Cloud API)developers.facebook.com
Events Meta accepts from chatsPurchase, LeadSubmitted, QualifiedLead and 11 othersdevelopers.facebook.com
action_source for chat eventsbusiness_messaging, channel whatsappdevelopers.facebook.com
GA4 conversionsCalled key events; mark the WhatsApp click as onesupport.google.com

Why WhatsApp leads lose their source

A customer clicks your Instagram ad, lands on the site, taps "WhatsApp us" and sends "Hi, price?". Your salesperson replies, sells, and the CRM records a deal with the source "WhatsApp". That is the channel the customer used to talk to you, not the ad that found them. After a month, Google Ads, Meta and TikTok each claim the same sales, and nobody can say which budget to cut.

The chain breaks in three places: when the person leaves your site for WhatsApp, when the chat starts with no context, and when the deal is created by hand. Each break has a fix.

Thumbs typing a message on a phone
Thumbs typing a message on a phone · Photo: Pexels
LinkWhat it recordsToolWorks with Business app?
1. UTM tags on every ad and post linkSource, medium, campaign, creativeLink builder, GA4Yes
2. WhatsApp click as a GA4 eventWhich page and campaign produced the clickGoogle Tag Manager or site codeYes
3. Reference code in the prefilled messageCarries the campaign into the chatwa.me linkYes
4. Source field on the CRM dealTies the sale to the campaignAny CRMYes
+ Click ID from click-to-WhatsApp adsAd-level attribution, sales sent back to MetaWhatsApp Business Platform, Conversions APINo, API only

1. UTM tags

Add utm_source, utm_medium and utm_campaign to every link you control: ads, bio links, QR codes, emails, influencer posts. Google's UTM reference also lists utm_content for telling creatives apart. Values are case sensitive, so Instagram and instagram become two sources. Write a naming sheet once and copy from it:

Placementutm_sourceutm_mediumutm_campaign
Meta ad, October offermetapaid_socialoct_offer
Google Search adgooglecpcbrand_search
Instagram bio linkinstagramsocialbio
QR code on the menuqrofflinetable_menu

2. The click as a key event

GA4 sees the visit but not the conversation. Record the moment someone taps the WhatsApp button as an event, whatsapp_click, and mark it as a key event (Google's current name for conversions). Now GA4 can tell you which campaign and which page produced WhatsApp clicks.

3. The reference code

WhatsApp's click to chat link takes a prefilled message: https://wa.me/9715XXXXXXXX?text= followed by URL-encoded text. Make the button add a short code built from the UTM tags:

  • Visitor arrived with utm_campaign=oct_offer and utm_source=meta → prefilled text "Hi, I'd like to know more (ref M-OCT)".
  • Visitor came from Google search → "(ref G-BRD)".
  • No tags → "(ref WEB)".

A few lines of JavaScript read the UTM values from the page address, keep them for the session, and build the link. The salesperson, or a bot, reads the code from the first message.

4. The CRM field

Create one required field on the deal or contact: "Lead source code". The first reply in WhatsApp is the moment to fill it. If the code is missing, the salesperson asks where the customer found you and picks from a fixed dropdown. Free text like "insta", "IG" and "Instagram ad" can't be counted.

Click-to-WhatsApp ads: the click ID

Ads that open WhatsApp directly skip your website, so links 1–3 don't apply. On the WhatsApp Business Platform (the API), Meta attaches a click ID, ctwa_clid, and ad details to the first message from that person. Meta's Conversions API for Business Messaging then lets you send events back from the chat:

  • action_source: business_messaging, messaging_channel: whatsapp;
  • ctwa_clid, which Meta calls a required field for WhatsApp events;
  • event names from Meta's list, including LeadSubmitted, QualifiedLead and Purchase, with value and currency.

The result: Meta's ad reports show which ads produced qualified leads and sales, not just "conversations started", and its delivery system can optimise towards buyers. On the WhatsApp Business app on a phone you don't get the click ID; use a different prefilled text per ad in the ad settings as your reference code.

Laptop with a growth bar chart on a desk
Laptop with a growth bar chart on a desk · Photo: Pexels

A month of numbers, done right

Hypothetical example to show the arithmetic, not a client result:

ChannelSpend, AEDWhatsApp clicks or chatsSalesCost per chatCost per sale
Meta ads (ref M-)6,0003001220500
Google Search (ref G-)4,0001001040400
Instagram bio (ref IG-)060600

By cost per chat, Meta looks twice as good as Google. By cost per sale, Google wins. Without links 3 and 4 you only ever see the first number. For turning this into return on spend, see the cost benchmarks in our guide to Meta ads costs in the UAE.

What nobody tells you

Most sales are logged by people, and people skip fields. The tracking is only as good as the habit of filling the source field before replying. Make the field required and check it weekly.

The same customer comes twice. Someone clicks a Meta ad on Monday and messages you from a Google search on Thursday. Decide one rule, usually first source wins, and keep it, or your reports will change every time someone looks.

Consent still applies. Tracking scripts and pixels on a UAE site need a lawful basis under the PDPL. See our guide to cookies and consent for UAE websites.

Vladimir Chernyshev, GM: if you do only one thing from this guide, do the reference code. It costs nothing, works with the free app, and turns "WhatsApp" in your CRM into an answer to the question every owner asks: which ad paid for itself.

Questions people ask

Can Google Analytics see what happens inside WhatsApp?

No. GA4 sees the visit and the click on your WhatsApp button, then the person leaves your site. Everything after that, the conversation and the sale, lives in WhatsApp and your CRM. You join the two with a reference code or, for Meta ads on the API, the click ID.

What is ctwa_clid?

It is a click ID Meta attaches when someone starts a chat from a click-to-WhatsApp ad. It arrives in the webhook for the first message on the WhatsApp Business Platform. Meta lists it as a required field for sending chat events back through the Conversions API. The WhatsApp Business phone app doesn't show it.

Won't customers delete the reference code from the prefilled message?

Some will. Keep it short and natural, at the end of the message, for example 'Hi, I'd like a quote (ref G12)'. When the code is missing, the salesperson asks 'Where did you find us?' and picks from a fixed list in the CRM, so the field is never empty.

Do I need the WhatsApp API to track leads?

No. UTM tags, a tracked click, a reference code and a CRM field work with the free WhatsApp Business app. The API adds automatic capture: the click ID, the ad ID and the message text go straight into the CRM, and you can report sales back to Meta.

Which number should I report: clicks, chats or sales?

All three, in that order, per channel. Clicks tell you about the page, chats about the offer, sales about the leads. A channel with many chats and no sales is not a good channel.

Sources

  1. Google Analytics Help: Collect campaign data with custom URLs (UTM)
  2. Google Analytics Help: About key events
  3. WhatsApp Help Center: How to use click to chat
  4. Meta for Developers: Conversions API for Business Messaging
  5. Stape: WhatsApp Conversions API overview

Reviewed . By Vladimir Chernyshev, General Manager, Savage Media. Photos: our own shoots and Pexels.

More from Savage Journal

All guides →