ctwa_clid: how to tell which ad a WhatsApp lead came from
ctwa_clid identifies which ad a WhatsApp lead came from. See where it appears and how to use it to attribute the conversation to the right campaign.
Published on
5 min read

A lead arrives through WhatsApp asking about the price. The sales team answers, closes the deal, and nobody knows whether that contact came from the acquisition ad that has been running for two weeks or from an organic click on the company's profile. The parameter that settles this question is called ctwa_clid, and it already arrives inside the conversation itself, but almost nobody captures it.
What ctwa_clid is
ctwa_clid is the unique identifier that Meta generates when someone clicks a Click to WhatsApp (CTWA) ad and lands directly in a conversation. The acronym comes from “Click To WhatsApp Ad”, and the code works like a version of the Google Ads GCLID inside the app: instead of living in a URL, it travels attached to the first message of the conversation.
According to the official Meta Conversions API documentation, the field goes in the user_data object of the payload and must not be hashed, unlike email and phone. That already says a lot about its function: it is not data about the person's identity, it is data about where the click came from.
Where ctwa_clid shows up in practice
The code arrives together with the first message the lead sends, inside an object called referral in the official WhatsApp API webhook. That object also carries the ad ID, plus the title and body of the creative the person saw before clicking. If the conversation did not start from an ad, the referral simply does not exist in the payload, and that absence is information in itself: the contact was organic.
One detail that breaks poorly built integrations: the referral is only filled in on the first message of that conversation. If the system does not save this data at the exact moment it arrives, the source is lost, because no later message carries the same field again.
Why WhatsApp leads often arrive without a clear source
Most support teams read only the text of the message, and the referral field goes unnoticed because it sits outside what appears on the WhatsApp Business or CRM screen. The result is the same old problem: that campaign's CAC disappears from the report and reappears as “organic WhatsApp” or “unknown channel”, inflating the top of the funnel in a way that distorts the reading of the whole funnel.
This also happens to teams that have already solved attribution for website forms but never connected WhatsApp to the same logic. The channel that generates the most meetings in many service operations ends up being precisely the one with the least source data.
Resource · In PortuguesePrompt Guide for Marketing and Sales70 prompts with questions about marketing, sales and behavior to ask your data.Download the guide
How to use ctwa_clid to attribute the lead to the ad
The path involves capturing the field at first contact and sending it back to Meta when the lead becomes a deal, not just storing it in a report. In practice, this involves three steps:
- Capture the
referralon the first message , recordingctwa_clid, the ad ID and the time along with the contact as soon as it enters the funnel. - Associate that data with the lead even when they come back through another number, email or channel, so the history does not become a new record with every contact.
- Report the conversion back to Meta through the Conversions API when the lead reaches a stage that matters to the business, so the algorithm learns to optimize for those who become customers, not just for those who send a message.
That is exactly the flow that a webhook capture workflow automates: it reads the payload as soon as the message arrives, records the ctwa_clid along with the lead and triggers the conversion to Meta at the right point in the funnel, without manually exporting a spreadsheet.
Where Laiki comes in
Laiki stores the ctwa_clid in the same lead record where the email, phone and the other funnel events already are. A Workflow reads the WhatsApp webhook as soon as the first message arrives, extracts the code and the ad ID, and associates both with the contact. When that same lead shows up again in another channel, the ID Combiner recognizes that it is the same person and keeps the source intact, instead of opening a second record with no ad history.
When the lead moves to a relevant stage of the sales funnel, the platform sends the conversion back to Meta automatically, with that contact's ctwa_clid, without depending on someone remembering to send it within the deadline.
Frequently asked questions
Does every WhatsApp lead have a ctwa_clid?
No. The code only exists when the conversation started from a click on a Click to WhatsApp ad. A contact who arrived through the bio link, through a referral or through a search on the company profile does not carry this field.
Does ctwa_clid expire?
Meta does not publicly document an expiration period the way it does with the Google Ads GCLID. In practice, the precaution that prevents data loss is the same: capture the field the instant the first message arrives, without relying on fetching it later.
Do I need to code to capture this data?
Someone needs to read the official WhatsApp API webhook at the moment it arrives, which is usually technical work. A data platform that already does this reading, as part of a Workflow, solves it without requiring the marketing team to write code.
Does ctwa_clid replace the UTM?
No. The UTM remains useful for the click that leads to a page or form. ctwa_clid solves the same problem inside WhatsApp, where there is no destination URL to carry any parameter.


