Back to Blog

WhatsApp Business

Click-to-WhatsApp Ads: How to Tell Which Ad Actually Brought You the Customer

Click-to-WhatsApp ads start chats, but Ads Manager cannot see who bought. Here is where Meta puts the ad details, how to save them on every lead, the ways to track from simple to reliable, and how to send real sales back to Meta.

Bilal Raza
Bilal Raza
Founder & Engineer
November 9, 2026
7 min read
Share
Click-to-WhatsApp Ads: How to Tell Which Ad Actually Brought You the Customer

You are running two Instagram ads that both open WhatsApp. At the end of the week your inbox is full, a few orders came in, and someone asks the simple question: which ad should get more money? Most small businesses cannot answer it. The chats are there, the orders are there, but nothing connects an order back to the ad that started the conversation.

I am Bilal Raza, co-founder and CEO of 12Monday Technologies in Karachi. We build 12Bot, a shared inbox and CRM for WhatsApp, Instagram and Facebook, and tracking where a WhatsApp lead came from is one of the problems we had to solve properly inside it. So this post is the practical version of what I know.

I will cover what a click-to-WhatsApp ad is, where the ad information actually shows up, the ways to track it from simplest to most reliable, and how to send real sales back to Meta so your ads get smarter.

What a click-to-WhatsApp ad is

A click-to-WhatsApp ad is a normal Facebook or Instagram ad whose destination is a WhatsApp chat instead of a website. The customer taps the button, WhatsApp opens with a message ready to send, and the conversation starts with your business number.

That is great for conversion, because chatting is easier than filling a form. It is bad for tracking, because the customer leaves the ad platform the moment the chat opens. Ads Manager can tell you how many chats an ad started. It cannot see what was said inside them, who bought, or how much they paid.

Where the ad information actually shows up

If your number is on the WhatsApp Business Platform (the Cloud API), Meta does something very useful. When a customer messages you from a click-to-WhatsApp ad, the incoming message arrives at your webhook with a referral object attached. According to Meta's webhook reference, it carries:

  • source_id: the ad ID
  • source_url: the ad URL
  • headline and body: the ad's headline and primary text
  • media_type plus image or video URLs
  • ctwa_clid: the click ID for that ad click
  • welcome_message: the greeting text set on the ad

Save it the moment it arrives

The referral comes with the message sent from the ad, not with everything the customer types after that. If your system does not store it on the contact right away, it is gone. This is the single most common reason teams "have the API" and still cannot answer which ad sold.

Status ads are a special case

Meta's docs say the ctwa_clid is left out entirely for messages that come from an ad in WhatsApp Status. You still get the ad details, but you will not be able to report those sales back to Meta with a click ID.

Here is the code I would start with

A small Express handler that keeps every ad touch on the lead, not just the first one:

// Express webhook: save the ad behind a new WhatsApp chat
app.post("/webhooks/whatsapp", async (req, res) => {
  const value = req.body.entry?.[0]?.changes?.[0]?.value;
  const msg = value?.messages?.[0];
  if (!msg) return res.sendStatus(200);

  if (msg.referral?.source_type === "ad") {
    await Lead.updateOne(
      { phone: msg.from },
      {
        $setOnInsert: { firstSeenAt: new Date() },
        $push: {
          adTouches: {
            adId: msg.referral.source_id,
            headline: msg.referral.headline,
            url: msg.referral.source_url,
            clickId: msg.referral.ctwa_clid, // missing for WhatsApp Status ads
            at: new Date(),
          },
        },
      },
      { upsert: true }
    );
  }
  res.sendStatus(200);
});

Ways to track which ad brought the customer

Not every business needs the full setup on day one. Here are the options, from simplest to most reliable:

MethodHow it worksWhat you learnWeak spot
Ask the customerAgent asks "Where did you see us?"A rough answer, sometimesPeople forget, guess, or never answer
Different opening text per adEach ad pre-fills its own first messageWhich ad, if the customer does not edit the textCustomers delete or rewrite the text
Ad ID from the APIThe first message arrives with the ad details attachedAd ID, headline, ad URL, every time, no typingNeeds the WhatsApp Business Platform (API) and a place to save it
Ad ID plus orders in a CRMThe ad details are saved on the lead, and orders are added laterChats, leads and orders per adYour team has to mark leads and orders consistently
Send results back to MetaConversions API events carry the ad click IDMeta sees which ads lead to real salesExtra setup on a dataset, and not available for Status ads

If you are still on the WhatsApp Business app

The cheapest trick is to give each ad its own opening message, for example "Hi, I saw the Eid Sale ad". It is not perfect because people edit the text, but it is better than guessing. When the volume grows, move to the API so the ad ID comes in automatically. I explained the trade-offs in my post on the WhatsApp Business app vs API.

Measure orders, not clicks

Once the ad ID is on every lead, the useful report is simple: for each ad, how many conversations, how many real leads, and how many orders. Clicks and even conversations can look good on an ad that never sells. The ad that started fewer chats but produced more orders is usually the one that deserves the budget.

Mark leads and orders the same way every time

The data is only as good as your team's habits. Agree on what counts as a lead, and attach every order to the customer record. In a WhatsApp CRM this is a tag or a pipeline stage. In a spreadsheet it is a column, and that works too when you are small.

Show agents the ad before they reply

Attribution is not only for the marketing report. If the agent sees "this came from the bedroom furniture ad", they can answer the right question in the first reply instead of asking "How can I help you?"

Send real sales back to Meta

This is the step most businesses skip, and it matters. Meta optimises your ads based on the signals it receives. If all it knows is "a chat started", it finds you more people who start chats. If you tell it which chats became purchases, it can look for more buyers.

Meta's Conversions API for Business Messaging does exactly this. You send an event such as Purchase with action_source set to business_messaging, messaging_channel set to whatsapp, your WhatsApp Business Account ID, and the ctwa_clid you saved earlier. Meta's parameter reference says the click ID must not be hashed.

// Later, when that lead buys: report the sale back to Meta
const lastTouch = lead.adTouches.at(-1);
if (lastTouch?.clickId) {
  await fetch(`https://graph.facebook.com/v26.0/${DATASET_ID}/events?access_token=${TOKEN}`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      data: [{
        event_name: "Purchase",
        event_time: Math.floor(Date.now() / 1000),
        action_source: "business_messaging",
        messaging_channel: "whatsapp",
        user_data: { whatsapp_business_account_id: WABA_ID, ctwa_clid: lastTouch.clickId },
        custom_data: { currency: "PKR", value: order.total },
      }],
    }),
  });
}

Use whatever Graph API version your app is on. The point is the shape: the click ID you saved on day one is what connects a sale on day five back to the ad.

Mistakes I see teams make

  • Only saving the first ad. A customer might click two different ads over a month. Keep every touch so you can see the full path.
  • Losing the referral on one phone. If chats are spread across personal phones, the data never reaches one place.
  • Judging ads by conversations alone. A cheap chat that never buys is not cheap.
  • Mixing this up with lead routing. Knowing where a lead came from is different from sending it to the right branch. I wrote about that separately in multi-branch lead routing on WhatsApp.

Wrapping up

Click-to-WhatsApp ads are easy to run and hard to measure, unless you capture the ad details the moment the first message arrives. Save the ad ID on the lead, count orders per ad instead of clicks, and send purchases back to Meta with the click ID so your next campaign learns from real sales.

If you are spending on WhatsApp ads and cannot tell which one sells, or you want help wiring this into your own stack or into 12Bot, I am happy to talk it through.

You can find me at bilalattari.com, email me at attari1235@gmail.com, or message me on LinkedIn.

Sources

#Click-to-WhatsApp Ads#WhatsApp Business API#Meta Ads#Conversions API#Attribution#12Bot
Bilal Raza — Founder & Engineer

Bilal Raza

Founder & Engineer

CEO of Islamic Desk (100K+ downloads) and Co-Founder & CEO of 12Monday. React and MERN engineer with 6+ years.

More Blogs

View all →