WhatsApp Campaign Attribution: Why Most Conversations Arrive Anonymous
Click-to-WhatsApp ads attach a referral object with eleven fields and a unique click ID. Plain wa.me links carry nothing. What that asymmetry costs you.
هذا المقال متوفر باللغة الإنجليزية.
نُشر في
Someone messages your WhatsApp number asking about the thing they just saw advertised. Three weeks later they buy. Nothing in that thread says which campaign brought them, and by the time the sale lands, the ad set that produced it has often already been switched off for underperforming.
The short answer is this. A conversation that begins with a tap on a Click-to-WhatsApp ad arrives at your webhook with a `referral` object attached, carrying eleven fields including `ctwa_clid` — an identifier unique to that one click. A conversation that begins with a tap on a plain `wa.me` link in your bio, on your website or behind a QR code arrives carrying nothing. WhatsApp click-to-chat links have no documented tracking parameter of any kind. That asymmetry, rather than your analytics setup, is why a large part of your WhatsApp pipeline cannot be attributed.
Why this is harder than web attribution
On the web, a click carries its origin along with it. The referrer, the UTM parameters on the landing URL and the ad platform's own click ID all survive the journey from ad to page, and any analytics tool can read them on arrival.
The handoff into WhatsApp works differently. The person leaves the browser completely and reappears in another application, identified only by a phone number. Whatever the browser knew about them does not travel. Two things cross that gap: what Meta chooses to attach to the conversation, and what the customer happens to type. Everything below is a consequence of that.
The four ways a conversation can carry its origin
There are only four, and they are not interchangeable. Each one fails in a different place.
1. The Click-to-WhatsApp ad referral payload
When someone taps an ad with a WhatsApp message destination, Meta attaches a `referral` object to the incoming message webhook. This is the only mechanism where the identifier is generated by Meta, travels invisibly and cannot be altered by the customer. It is also the only one that works solely for paid traffic.
2. A code inside the pre-filled message
A click-to-chat link supports exactly one documented parameter. WhatsApp's own click to chat guide documents `https://wa.me/<number>?text=urlencodedtext`, where the text is "the URL-encoded pre-filled message" that "will automatically appear in the text field of a chat". Putting a campaign code in that text is the standard workaround for organic links, and it is the weakest mechanism available, for a reason covered further down.
3. A separate link, number or QR code per campaign
If each campaign gets its own destination, the destination is the attribution. Coarse, and it survives everything, because it depends on no payload at all. The cost is operational: more numbers to warm up, more inboxes to watch, and a practical ceiling on how many campaigns you can keep apart.
4. Tagging the conversation once it arrives
An agent asks how the customer heard about you and labels the thread. This is the only method that captures what no payload can — a billboard, a podcast, a recommendation from a friend — and it loses whatever the agent forgets to ask.
| Method | Works for | What it attributes | Where it fails |
|---|---|---|---|
| Ad referral payload | Paid Click-to-WhatsApp only | The exact ad, creative and click | Organic traffic; Status placements |
| Code in pre-filled text | Any click-to-chat link | The link that was clicked | The customer can edit or delete it |
| One number or link per campaign | Everything, including offline | The campaign, not the creative | Operational cost; does not scale far |
| Agent tagging on arrival | Everything, including word of mouth | Whatever the customer says | Inconsistent; depends on asking |
What the referral object actually contains
Most write-ups mention `ctwa_clid` and stop there. Meta's text messages webhook reference documents eleven fields, and the rest matter, because together they let you reconstruct which creative produced a conversation without calling back into the ads API at all.
| Field | What it carries |
|---|---|
| `source_id` | The Click-to-WhatsApp ad ID |
| `source_url` | The ad URL |
| `source_type` | The source kind; the documented example is `ad` |
| `headline` | The ad's headline |
| `body` | The ad's primary text |
| `media_type` | Either `image` or `video` |
| `image_url` | Image ads only |
| `video_url` | Video ads only |
| `thumbnail_url` | Video ads only |
| `welcome_message.text` | The ad's greeting text |
| `ctwa_clid` | The click ID, unique to that single tap |
The reference states the object is "only included if message sent via a Click to WhatsApp ad". `ctwa_clid` itself was added on September 27, 2023, according to Meta's WhatsApp changelog, which describes it as the click ID generated when a user taps an ad that clicks to WhatsApp in order to send the message. Meta's Conversions API documentation puts it more usefully: a personal identifier, unique per click, exposed to the business when the person entering the conversation came from a click-to-WhatsApp ad.
Closing the loop: sending the conversion back
Capturing the click ID is half the job. The other half is telling Meta what happened afterwards, so the ad platform can optimise against sales rather than against conversations started. That is what the Conversions API for Business Messaging is for.
- `action_source` is set to `business_messaging`.
- `messaging_channel` is set to `whatsapp` — the same endpoint takes `messenger` and `instagram`.
- The click ID goes inside `user_data`, alongside `whatsapp_business_account_id`, and the documented examples send it unhashed.
- Meta's guidance is blunt: send `ctwa_clid` whenever you have it.
There is a fallback for when you do not have it, based on hashed customer information rather than a click ID, and it comes with a hard limit worth knowing before you design around it: it attributes an event to an ad interaction from the past seven days. A sales cycle longer than a week will not be matched that way. This is the single strongest practical argument for storing the click ID against the conversation the first time you see it, rather than hoping to reconcile later.
Automatic events, and the four places they are not available
Meta also offers an Automatic Events API. Businesses on Embedded Signup can opt in, after which Meta applies a combination of regular expressions and natural language processing to new message threads that originated from Click-to-WhatsApp ads, and fires an `automatic_events` webhook when it believes it has found something. The documented events are `LeadSubmitted` and `Purchase`.
It is genuinely useful if you do not want to instrument your own funnel. It also requires that you have already implemented Embedded Signup, that your webhook server is live, and that your app is subscribed to the `automatic_events` field in the App Dashboard.
Three things that quietly break attribution
The customer can delete your tracking code
This is the flaw in the pre-filled text method and it is not a small one. The text does not travel in a hidden field. It lands in the customer's message box, visible, with a send button next to it. A string like `#CAMP-SPRING-07` sitting in front of a cautious person is exactly the kind of thing they delete before pressing send, and a thoughtful one may rewrite the whole message in their own words. You will never know it happened: the conversation simply arrives looking organic. Any report built on pre-filled codes is a floor, not a count.
QR codes and short links have no analytics, by design
Meta's QR codes and message links documentation says it outright: "Analytics are not available for QR Codes and Short Links as we limit the amount of data we log to protect user privacy." Short links also mask the phone number and remove the message from the URL, which is good for the customer and removes your hook at the same time. Pre-filled messages on those links are capped at 140 characters. If you need per-campaign reporting from a printed code, the separation has to come from using a different code per campaign, because no data is coming back.
The documentation does not say the referral object repeats
The reference documents the trigger as a user sending a message via a Click-to-WhatsApp ad, and says the object is only included when that is how the message was sent. It does not state whether the object appears on every subsequent message in that thread or only on the first one. If your implementation quietly assumes one or the other, test it against your own webhook rather than trusting the assumption — and store the identifier against the conversation the first time it appears, which is correct under either behaviour.
What we do, and where ours stops
We run this site on the same mechanisms, so it is worth being specific about where ours is weaker than the above, rather than implying we have solved it.
The WhatsApp buttons on this blog use a `wa.me` link with a pre-filled message carrying a trigger string, which the demo workflow answers automatically. That means our organic attribution has exactly the weakness described above: the reader can edit the text before sending, and some will. Our demo link and our sales link also currently share one business number, so we cannot separate those two streams by destination — the coarse-but-robust method in the table is one we are not yet using. And we have not verified whether our own trigger matches on substring, which is the detail that would let a single link carry a campaign code alongside the trigger. Until that is tested, we do not claim per-campaign attribution on organic clicks, because we do not have it.
What a platform can usefully do here is narrower than most vendors imply: keep the conversation attached to a contact for the life of the relationship rather than the life of a session, and make it possible to fire a conversion event from wherever the sale is actually recorded. WABPO keeps WhatsApp, Instagram and Messenger conversations on one contact record with history, labels and notes, and exposes public APIs and webhooks so that event can be sent from your own system. To be exact about what that does and does not include: capturing and storing `ctwa_clid` per conversation is a separate piece of plumbing, and if a vendor tells you their inbox does it, ask to see the field. The honest framing is that the messaging platform holds one end of the thread and your billing system holds the other, and somebody has to join them.
Where to start if none of this is set up
- Store the whole `referral` object on the first inbound message, not just the click ID. The creative fields cost nothing to keep and save an ads API call later.
- Attach it to the contact, not the session. A seven-day matching window is short, and your sales cycle probably is not.
- Give any campaign you actually care about its own link or number, so it is attributable even when the payload is missing.
- Treat pre-filled codes as a lower bound on volume and never as a count.
- Check whether your market is excluded from automatic events before you design a funnel around them.
أسئلة شائعة
Can you track which ad a WhatsApp message came from?
Yes, if the message came from a Click-to-WhatsApp ad. Meta attaches a referral object to the incoming message webhook containing the ad ID, the ad URL, the headline, the primary text, the media type and ctwa_clid, a click ID unique to that tap. If the message came from a plain wa.me link, no such data exists, because click-to-chat links have no documented tracking parameter.
What is ctwa_clid?
It is the Click-to-WhatsApp ad click ID — a unique per-click identifier Meta exposes to the business when someone starts a conversation by tapping a click-to-WhatsApp ad. It was added to the referral object on September 27, 2023. You send it back through the Conversions API, inside user_data and unhashed, when the conversation produces a conversion.
Does ctwa_clid always arrive?
No. Meta's webhook reference states the property is omitted entirely for messages originating from an ad in the WhatsApp Status placement. Those conversations arrive with no click ID at all, so campaigns relying on Status will under-report relative to other placements even when they perform identically.
Can you add a ref or UTM parameter to a wa.me link?
No. WhatsApp's click to chat documentation lists one parameter, text, which pre-fills the customer's message box. There is no documented referral or tracking parameter. The common workaround is putting a campaign code in that pre-filled text, but the customer sees it and can delete it before sending, so it under-counts by an unknown amount.
How long is the WhatsApp conversion attribution window?
When you send the click ID itself, you are matching on an identifier rather than a window. The fallback path, which matches on hashed customer information instead, attributes an event to an ad interaction from the past seven days. That is why storing the click ID against the contact at first contact matters for any sales cycle longer than a week.
Do QR codes report which campaign a customer scanned?
No. Meta's documentation states that analytics are not available for QR codes and short links, because it limits the data logged to protect user privacy. Pre-filled messages on them are capped at 140 characters. To attribute a printed campaign you need a distinct code or number per campaign, since no reporting comes back from the code itself.
بقلم
Saifullah AlamFounder — Spadasoft, WABPO & WAWCD
Saifullah Alam founded Spadasoft, WABPO and WAWCD. He builds WhatsApp Business API products and writes practical, no-hype guides about what actually ships.
تابع القراءة
8 Best WhatsApp Marketing Tools in 2026 (Honest Comparison)
Every list like this is written by one of the tools on it — including this one. So here's the honest version: what actually matters, and who each tool fits.
One Inbox for WhatsApp and Instagram: What to Check Before Several People Share a Number
Once more than two people answer the same number, the question stops being "can it send messages" and becomes "who is supposed to answer this one". Five things to test before you pay for anything.
WhatsApp Service Message Pricing: What Changes on October 1, 2026 — and What It Really Costs Your Business
The famous free 24-hour window is ending. From October 1, 2026, Meta charges for every service message after 1,000 free per number each month — and utility templates inside the window are billed too. Here is exactly what changes, what it costs, and how to shrink the bill before it arrives.
