In the ads manager the “messages started” count is clear and so is the cost. Then comes the question: how many of these chats turned into sales? Most businesses answer that from a notebook or from memory, and the ad system never finds out. In this post we explain where the identifier that links a sale to an ad click comes from, how to store it and how to send it back to Meta. The source of the technical details is Meta's developer documentation.
Short Answer
When a customer clicks the ad, Meta generates a click-specific identifier (ctwa_clid) and this identifier arrives at your WhatsApp webhook with the first message. If you store the identifier with the customer record, when the sale closes you can send the “this person bought” information to Meta with the same identifier through the Conversions API. If you don't store the identifier, there is no way left to link the sale to the ad.
Where Does the Problem Start?
In an ad that goes to a website, the pixel tracks the visitor and passes cart and purchase events to Meta. In a Click-to-WhatsApp ad, the visitor never visits the site. They click, WhatsApp opens, and the conversation happens there. A payment link is sent, a bank transfer arrives, or maybe the customer comes to the shop and pays cash. None of this takes place in a browser, so the pixel knows nothing of the story.
The result is a bad picture for ad optimization. Because Meta's algorithm doesn't know which chat turned into a sale, all it has is the “started a chat” signal. It may keep spending budget on an audience that opens many chats but never buys. And you, looking at the report, may think the campaign is good because the cost per chat is low.
What Is ctwa_clid and Where Does It Come From?
Meta's documentation defines ctwa_clid as a “click-specific personal identifier”. When a user starts a chat from a Click-to-WhatsApp ad, the incoming message in the WhatsApp Business Platform's Messages webhook contains a referral object, and ctwa_clid is part of that object. According to the documentation, what you need to do is store this identifier with the conversation and reuse it when sending the conversion event.
There are two important consequences here. First, because the identifier arrives via webhook, you need a setup running on the WhatsApp Business Platform (Cloud API). If you use the app on your phone by hand, you can't capture the identifier automatically. Second, the identifier lives only in the referral information in the first message. If the flow that processed that message didn't save the identifier, there is no easy way to get it back later.
How Do You Report the Sale to Meta?
Meta offers a Business Messaging-specific Conversions API flow for this job. Events are sent to a dataset in Events Manager. The main fields of the example request in the documentation are as follows:
- event_name: For example
Purchase. The documentation's list also has other events such asLeadSubmitted,QualifiedLead,InitiateCheckoutandAddToCart. A plainLeadevent isn't in the list; the closest isLeadSubmitted. - event_time: The Unix timestamp of the event.
- action_source:
business_messaging - messaging_channel:
whatsapp - user_data:
whatsapp_business_account_idand thectwa_clidyou stored - custom_data: For a sale,
currencyandvalue, that is, the currency and the amount.
Meta wants these events to reflect only interactions in the messaging conversation. For conversions that happen on your website or in your app, the other Conversions API products are used. So if the same customer both talked on WhatsApp and shopped on your site, you need to avoid mixing the two paths.
What You Need Before Setup
Meta's Business Messaging onboarding page says this integration is written mainly for partners (WhatsApp solution providers). Among the listed prerequisites are a Facebook developer app, advanced access to the whatsapp_business_management and whatsapp_business_manage_events permissions, and a login flow that can obtain an access token (Embedded Signup or Facebook Login for Business). A WhatsApp Business account ID and a dataset ID created with the Dataset API are also needed. The page also mentions a Marketing API access tier, but the threshold values are written differently in two places on the page, so we recommend confirming the figure with Meta in your own account.
In practice: if you use a ready-made WhatsApp platform or CRM, your provider will in most cases set up this connection. If you are writing your own flow with n8n, you need to manage the permissions and the token yourself. When getting a quote, asking explicitly “do you send sales events back to Meta?” is enough to avoid surprises later.
A Simple Flow with n8n
The logic has three steps and none is complicated.
Capture. If the first message coming from the webhook has a referral object, write the ctwa_clid into the CRM or a table together with the customer's phone number. Messages without a referral are organic chats; marking them separately will later show you the ad's contribution.
Mark the sale. The sale can come from an automatic event such as a completed payment link, or from a sales rep saying “won” in the CRM. What matters is that this mark is recorded somewhere.
Send it back. When the mark arrives, the flow takes the ctwa_clid and the amount from the record and sends an event to Meta with the fields above. Meta's documentation states that it does not deduplicate events itself and that you must do this before sending. To avoid reporting the same sale twice, it is enough to add an “was this order already sent” check to the flow.
What If There Is No Identifier?
The documentation doesn't specify a time limit on the ctwa_clid route. The alternative route, where the identifier isn't used, relies on the customer's hashed information. On this route, events are attributed only to ad interactions in the last seven days; later conversions are accepted but not credited to the ad. This alternative is also open only in some countries. We couldn't tell from the documentation whether Turkey is on this list, so basing the plan on storing the identifier is more robust.
The KVKK Side
ctwa_clid is not a name on its own, but Meta defines it in its own documentation as a personal identifier. Once stored matched to a phone number, it makes sense to treat it as personal data, like your conversation record. Telling Meta which ad a customer came from and how much they spent is a data transfer that should be covered in your privacy notice. Clarify this with your lawyer or your KVKK adviser; for the architecture of the data flow, our KVKK-compliant automation article is a good starting point.
What Do You Do with This Data?
Two things change once sales start appearing in the ad report. First, you can look at cost per sale per ad instead of cost per chat per ad. An ad that brings lots of chats but no closings becomes noticeable. Second, the conversion event can be used as the campaign's optimization goal; that is, Meta can start looking for people who resemble buyers rather than people who open chats. Before changing the goal you need to accumulate enough events; you can see the number of events Meta's learning phase requires for your own campaign in Ads Manager.
We explained the effect on the fee side of replying to a customer from an ad within the first 24 hours in our WhatsApp 24-hour rule article. Once measurement is set up, the two topics work together: a fast reply affects both cost and closing rate, and you see both in numbers. To calculate the return on the investment, see our WhatsApp automation return article.
FAQ
What is ctwa_clid?
According to Meta's documentation, a click-specific identifier generated on every click of a Click-to-WhatsApp ad. It arrives inside the referral object of the message webhook when the customer starts the chat.
What happens if I don't report the sale back to Meta?
The ads manager sees only the number of chats started. Because the campaign can't learn who bought, it keeps targeting people inclined to open chats.
Can this tracking be done with the regular WhatsApp Business app?
The method Meta describes requires a WhatsApp Business Platform (Cloud API) integration, because ctwa_clid arrives via webhook. If you use the app by hand, you can't save the identifier automatically.
Sources: Meta for Developers, "Conversions API for Business Messaging: Onboarding Guide". Field names, the event list and prerequisites are reported as the page stood on the date of writing; Meta may update them.
Let's get sales from ads into your report
In half an hour we can find the place in your current WhatsApp and CRM setup where ctwa_clid gets lost.