> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.flowella.io/llms.txt
> Use this file to discover all available pages before exploring further.

# UTM tracking from WhatsApp to HubSpot

> Attribute WhatsApp conversations to the campaign that started them using UTM parameters on Click-to-WhatsApp ads, click-to-chat links, and CTWA tracking.

When a customer reaches you via WhatsApp, the most valuable bit of context is **where they came from**: which Click-to-WhatsApp (CTWA) ad they tapped, which website link, which email campaign. Without that attribution, your reporting collapses into "WhatsApp" as a single source. With it, you can compare campaigns, calculate ad ROAS, and feed proper attribution into HubSpot deals.

This page covers the three patterns Flowella supports for moving campaign attribution from WhatsApp into HubSpot.

## Pattern 1: Click-to-WhatsApp ads (`ctwa_clid`)

Facebook and Instagram CTWA ads attach a click ID (`ctwa_clid`) to every conversation they originate. Meta passes this ID into the conversation context when the user taps the ad and starts the chat, and Flowella forwards it to HubSpot on the contact record.

Flow:

1. Customer sees a CTWA ad on Facebook or Instagram.
2. Customer taps the **Send Message** button on the ad. WhatsApp opens with a pre-filled message and Meta records the `ctwa_clid`.
3. Customer sends the message. Flowella receives the inbound message with `ctwa_clid` in the metadata.
4. Flowella creates or updates the HubSpot contact with the `ctwa_clid` value on a dedicated property.
5. Flowella also stores the `ctwa_clid` against the conversation so analytics can join back to the ad spend.

<Note>
  Meta's Conversions API integration to send conversion events back to Facebook Ads Manager uses the same `ctwa_clid`. See [CTWA Ads](/campaigns/click-to-whatsapp-ads) for setting this up so you can optimise ad spend on actual conversions, not just clicks.
</Note>

## Pattern 2: Click-to-chat links from your own pages

When you put a **Chat on WhatsApp** button on your website or email, you'll use a `wa.me` link. The link supports a `text` parameter that pre-fills the user's first message:

```text theme={null}
https://wa.me/441234567890?text=Hi%20I%27m%20interested%20in%20%5BSPRING_LAUNCH%5D
```

Flowella can parse the pre-filled message for tracking codes and write them to HubSpot. The convention we recommend:

* Use a **bracketed keyword** the user is unlikely to type by accident, e.g. `[SPRING_LAUNCH]` or `[NEWSLETTER_JUL]`.
* Wrap the keyword in markers so the parsing is unambiguous.
* Keep the keyword short and human-readable so the pre-filled message still looks natural.

The extracted code lands in the HubSpot contact's `whatsapp_entry_source` property (or a custom property you specify in **Flowella → Settings → HubSpot**).

### Generating the links per campaign

A practical pattern: in your HubSpot campaign tool or marketing spreadsheet, build a small lookup of campaign → entry code, and generate one `wa.me` URL per campaign. Use a URL shortener or the campaign's tracking URL if you want a tidier link on email and ad creatives.

## Pattern 3: Form-submission UTMs

When a HubSpot form submission triggers a WhatsApp workflow, the standard HubSpot UTM properties (`hs_analytics_first_url`, `hs_analytics_source`, `hs_analytics_source_data_1` etc.) are already on the contact. Flowella reads these via the HubSpot integration and surfaces them in the conversation context.

This is the cleanest pattern when WhatsApp is a **follow-up** channel: the customer originally arrived via a UTM-tagged URL, submitted a form, and Flowella triggers a WhatsApp Flow that fills in the gaps. The UTM attribution is preserved end to end without anything specific to WhatsApp.

## Building HubSpot reports against this data

Once the attribution lands on the contact, you can build standard HubSpot reports against it:

* **Contacts by `whatsapp_entry_source`** — which campaigns drove WhatsApp leads
* **Deals → first source = WhatsApp** — revenue attributable to WhatsApp-originated contacts
* **Workflow performance by source** — which campaigns produced the highest reply / conversion rates inside the WhatsApp Flow

See [Reporting and dashboards](/hubspot/reporting-and-dashboards) for the report patterns we recommend setting up.

## What attribution does Flowella write to HubSpot?

By default, Flowella writes the following properties on each contact during WhatsApp activity:

| Property                      | Type      | When written                                                 |
| ----------------------------- | --------- | ------------------------------------------------------------ |
| `whatsapp_opted_in`           | Boolean   | When the contact gives WhatsApp consent                      |
| `whatsapp_first_message_at`   | Timestamp | When Flowella first sees an inbound message                  |
| `whatsapp_last_message_at`    | Timestamp | Updated on every inbound message                             |
| `whatsapp_entry_source`       | String    | First inbound message's parsed source code or `ctwa_clid`    |
| `whatsapp_campaign_id`        | String    | The Flowella campaign ID for the conversation, if applicable |
| `whatsapp_template_last_sent` | String    | The most recent template sent to the contact                 |

You can map additional WhatsApp data to custom HubSpot properties in **Flowella → Settings → HubSpot → Field mapping**.

## Common gotchas

<AccordionGroup>
  <Accordion title="`ctwa_clid` only appears for ad-originated conversations">
    Not every WhatsApp inbound carries a `ctwa_clid`. Only those that came from a Facebook/Instagram CTWA ad do. Direct messages (where the customer typed your number into WhatsApp manually) won't have this value, which is correct — there's no ad to attribute them to.
  </Accordion>

  <Accordion title="`text` pre-fill can be deleted by the user">
    The pre-filled message is just a default. Some users delete it before sending, others edit it. Don't rely on it for critical routing logic.

    For robust attribution, prefer `ctwa_clid` (which the user can't strip) over `text` pre-fill parsing (which they can).
  </Accordion>

  <Accordion title="Multiple touches before the WhatsApp message">
    A customer who clicked a Facebook CTWA ad on Tuesday, didn't message, then opened the same ad on Wednesday and did message, will have the Wednesday click's `ctwa_clid` in the WhatsApp metadata. HubSpot's standard first-touch / last-touch attribution still works on the underlying UTMs if the customer also visited your website in between.
  </Accordion>
</AccordionGroup>

## Related guides

* [CTWA Ads](/campaigns/click-to-whatsapp-ads) — full setup including Conversions API
* [Reporting and dashboards](/hubspot/reporting-and-dashboards) — turning attribution data into reports
* [Workflow Actions](/hubspot/workflow-actions) — the workflow actions that fire when an inbound message arrives
