Tracking referrals from Meta ads
When people click on a Facebook ad to start a new WhatsApp conversation, information about that conversion is shared by Meta. This guide will cover how to push ad referral data for conversations to your system from flows or webhooks.
Requirements for set-up
You'll need the following:
- a WhatsApp flow set up on your Cue workspace
- a Facebook page with posts or ads with a click-through button to your WhatsApp number connected to your Cue workspace
- A system that can ingest the data posted to an endpoint, which will allow you to build a report (E.g. CRM system, BI tool, custom-built platform)
Getting Ad Referral Data in Cue Webhooks
If you've set up webhooks to send inbound messages from your Cue workspace to your own service, then ad referral data gets included in the first inbound message payload when a conversation is started from a Facebook ad. The webhook payload will include an extra referral
property with all the associated referral data.
Getting Ad Referral Data from Cue Flows
If you want to send ad referral data at some point in your flow you can add an HTTP Request step and in the field where you specify the body of the request press {
to bring up the property autocomplete menu which will allow you to insert the ad referral data properties into your request payload.
Here is an example of how this could be done:

Property | Description | Example |
---|---|---|
{{initialMessage.referral.ctwaClid}} |
Click-to-WhatsApp Click ID | 1234567890 |
{{initialMessage.referral.sourceId}} |
Source ID of the campaign | 212731241638144 |
{{initialMessage.referral.sourceType}} |
Source type of campaign | post |
{{initialMessage.referral.sourceUrl}} |
Source URL of the ad | https://fb.me/post_id |
{{initialMessage.referral.headline}} |
Headline text of the ad | New Products! |
{{initialMessage.referral.body}} |
Body text of the ad | Check out our new product offering |
{{initialMessage.referral.mediaType}} |
Type of ad message | image |
{{initialMessage.referral.imageUrl}} |
URL of ad image | https://example.com/image.jpg |
{{initialMessage.referral.thumbnailUrl}} |
URL of ad thumbnail | https://example.com/thumbnail.jpg |
{{initialMessage.referral.videoUrl}} |
URL of ad video | https://example.com/video.mp4 |
Use cases for attribution
Attributing Facebook Ads and posts with a Click-to WhatsApp is crucial because it helps measure, optimise, and justify your marketing efforts:
Track ROI - Attribution shows which ads or posts are actually driving conversations on WhatsApp. If someone clicks an ad and starts a WhatsApp chat, you can connect that cost to a potential lead or sale.
Understand Customer Journey - Click-through attribution tells you how people move from Facebook to WhatsApp. Helps identify: Which creatives or CTAs drive action, where drop-offs happen, and whether WhatsApp is the preferred channel for conversions or support.
Report on Performance - Marketing teams can track which efforts are generating leads or sales. If you’re using WhatsApp as a lead-gen or support tool, tracking clicks and conversations helps prove its value.
Enable Automation & CRM Integration - With proper attribution, you can feed WhatsApp interactions back into your CRM or analytics tools. This allows for lead scoring, follow-up automations, and attribution to closed sales.