> For the complete documentation index, see [llms.txt](https://docs.dapta.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dapta.ai/integrations/meta-ads-conversions.md).

# Meta Ads Conversions

When a WhatsApp conversation that started from a **Click-to-WhatsApp** (CTWA) Meta ad reaches a goal you define, Dapta automatically reports that conversion back to Meta through the **Conversions API (CAPI)**. This gives Meta the signal it needs to optimize your ad delivery toward people who actually convert — and makes your ad reporting more accurate.

{% hint style="info" %}
This feature only fires for conversations that began from a **Click-to-WhatsApp ad**. Regular WhatsApp conversations are not counted.
{% endhint %}

***

**📘 What you'll learn in this document:**

* **Part 1:** Connect your Meta Ads credential in Settings
* **Part 2:** Configure your Text Agent to send conversions to Meta
* **Good to know:** How attribution and deduplication work

***

**✅ Before you start — Prerequisites:**

* An active **Text Agent** connected to WhatsApp in Dapta
* **Click-to-WhatsApp ads** running in your Meta Ads account
* Admin access to the **Events Manager dataset** linked to those ads (at [business.facebook.com/events\_manager2](https://business.facebook.com/events_manager2))

***

#### 🔐 Part 1: Connect your Meta Ads credential

> Go to **Settings** → **Integrations** → open **Meta Ads Integration**.

You need two values. Both come from the **same screen** in [Meta Events Manager](https://business.facebook.com/events_manager2):

**Step 1:** Open Meta Events Manager and select the **dataset** connected to your ads.

**Step 2:** Copy the **Dataset / Pixel ID** — it appears at the top of the page, just below the dataset name. It is a long number.

**Step 3:** In that same dataset, go to **Settings** → **Conversions API** → click **"Generate access token"**. Copy the token immediately.

> ⚠️ **Treat the Conversions API token like a password.** Dapta stores it securely and will not show it again after you save. No Facebook login, OAuth flow, or App Review is required — you are using your own Events Manager token.

| Field                     | Where to find it                                                                |
| ------------------------- | ------------------------------------------------------------------------------- |
| **Dataset / Pixel ID**    | Events Manager → select your dataset → shown at the top, below the dataset name |
| **Conversions API token** | Same dataset → **Settings** → **Conversions API** → **"Generate access token"** |

**Step 4:** Paste both values into the **Meta Ads Integration** credential dialog in Dapta and click **Save**.

{% hint style="warning" %}
**📸 Screenshot coming soon** — the credential dialog (Dataset / Pixel ID and Conversions API token fields) will be added here once this feature is deployed to production.
{% endhint %}

***

#### ⚙️ Part 2: Configure your Text Agent

> Open your **Text Agent** → go to **Settings** → expand the **"Meta Ad Conversions"** accordion.

**Step 1:** Turn on the toggle **"Send conversions to Meta for this agent"**.

**Step 2:** Choose the conversion event that best describes your goal. Pick **one** from the list:

* **Lead** — the contact expressed interest or submitted their information
* **Contact** — the contact reached out to learn more
* **Schedule** — the contact booked an appointment
* **Complete registration** — the contact completed a sign-up process
* **Submit application** — the contact applied for a product or service

> 💡 **Tip:** These are Meta's standard lead-generation events — they tell Meta what kind of user action to optimize for. Only these five events are available, so your ad optimization stays focused on lead-gen outcomes and avoids mixing with e-commerce signals.

**Step 3:** (Optional) Edit the **"When to count it as a conversion"** field. This is a short instruction that tells Dapta's AI when a finished conversation qualifies as the event you selected. Each event ships with a sensible default — customize it if your use case needs a more specific definition.

**Step 4:** Click **Save**.

{% hint style="warning" %}
**📸 Screenshot coming soon** — the "Meta Ad Conversions" accordion in agent settings (toggle, event selector, and conversion instruction field) will be added here once this feature is deployed to production.
{% endhint %}

***

#### 💡 Good to know

**How conversion detection works:** Only conversations that started from a Click-to-WhatsApp ad carry the click identifier that Meta requires. At the end of a qualifying conversation, Dapta reads the full transcript and determines whether your goal was met. If yes, exactly **one** conversion event is sent to Meta — a deduplication guard prevents any double-counting, even if the conversation is re-processed.

**Attribution window:** 7-day click / 1-day view (Meta's standard Conversions API attribution).

**See which ad started each conversation:** In your **Inbox**, conversations that came from a Click-to-WhatsApp ad display a small **Facebook badge**. You can filter the inbox by ad to review the conversations generated by each campaign.

{% hint style="warning" %}
**📸 Screenshot coming soon** — the Inbox Facebook badge on a Click-to-WhatsApp conversation will be added here once this feature is deployed to production.
{% endhint %}

***

{% content-ref url="/pages/anfdTczN1uZyNz5LkS0L" %}
[Connect your Agent with WhatsApp](/ai-text-agents/channels/connect-your-agent-with-whatsapp.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.dapta.ai/integrations/meta-ads-conversions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
