Track which Facebook or Instagram ad drove a WhatsApp chat

See which paid Click-to-WhatsApp ad triggered every WhatsApp conversation in Deskwoot.

Also available in:DeutschPortuguês

Tracking which Facebook or Instagram ad drove a WhatsApp chat is automatic in Deskwoot: every Click-to-WhatsApp ad sends Meta's referral data to your inbox with the first message, and Deskwoot saves the full ad context on the conversation, on the contact, and through the API.

What gets captured

Every time a visitor clicks a Click-to-WhatsApp ad and sends their first message, Meta attaches a referral object to the inbound webhook. We save the whole thing on the conversation:

  • Source type. Either ad or post, depending on whether the click came from a paid ad or a "Send Message" CTA on a Facebook/Instagram post.
  • Ad or post ID. The Meta object that drove the click, useful for grouping conversations by ad in your reports.
  • Click ID (ctwa_clid). The per-click identifier you can match against your Meta Ads reporting and feed back into the Conversions API.
  • Headline and body. The exact ad copy the visitor saw at the moment of the click.
  • Source URL. A direct link back to the ad or post on Facebook.
  • Media type plus image or video URL. The creative the visitor was looking at when they clicked.

Where to find it in Deskwoot

Open any WhatsApp conversation. The right-hand information panel shows a green Came from WhatsApp ad card whenever the conversation started from a Click-to-WhatsApp ad. If the same person clicks another ad while their conversation is still open, the new attribution replaces the visible card and the previous one is preserved on conversation.customAttributes.whatsappReferralHistory.

The latest referral is also mirrored onto the contact under customAttributes.lastWhatsappReferral, so the attribution sticks around for any future conversation from the same person.

Pulling it via API

The data is exposed on the standard conversation and contact endpoints under customAttributes:

GET /api/v1/accounts/<accountId>/conversations/<id>
{
  "id": "...",
  "customAttributes": {
    "whatsappReferral": {
      "sourceUrl": "https://fb.me/2abc123def",
      "sourceId": "120203456789012345",
      "sourceType": "ad",
      "headline": "Patch Video Ad",
      "body": "Get our new patch with 30% off this week",
      "ctwaClid": "AAabcdEFGHijklMNOPqrstUVWxyz1234567890",
      "capturedAt": "2026-05-01T19:39:41Z"
    }
  }
}

Sending the data into your CRM or ad platform

Set up a webhook subscription under Settings, Webhooks, New, and pick the conversation.created event. Every payload now carries the same customAttributes.whatsappReferral shape, so you can pipe the click ID and ad ID into HubSpot, Pipedrive, Notion, Google Sheets, or back into Meta's Conversions API for closed-loop optimization.

Limits to know about

  • Meta only attaches the referral object to the very first message of an ad-originated session. We grab it on the first message and persist it. Later messages in the same conversation do not carry it.
  • Conversations that did not start from an ad (organic chats, manual replies, link-clicks not tied to an ad) will not show the card. That is correct behavior, since there is nothing to attribute.
  • The feature requires the WhatsApp Cloud API channel. WhatsApp via Twilio does not expose the same payload.

Explore more

Related articles