> 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

Report Click-to-WhatsApp ad conversions back to Meta via the Conversions API so Meta can optimize ad delivery toward people who actually convert.

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.

## What do I need before connecting Meta Ads Conversions?

You need an active Text Agent connected to WhatsApp in Dapta, Click-to-WhatsApp ads running in your Meta Ads account, and admin access to the Events Manager dataset linked to those ads. From that dataset you copy a Dataset/Pixel ID and generate a Conversions API access token to paste into Dapta's Meta Ads Integration credential dialog.

{% 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 — from **Credentials** or from inside the agent
* **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 **Credentials** in the left menu → on the **Meta Ads** card, click **+** to open the **Meta Ads Integration** dialog. You can also open the same dialog without leaving a Text Agent: in its **Meta Ad Conversions** panel (Part 2), click **Add credential**.

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:** In the **Meta Ads Integration** dialog, give the credential a **Name** — a label to help you recognize the connection. The credential belongs to the whole workspace, so everyone in it sees this name on the **Credentials** page and in each agent's panel. Paste the **Dataset / Pixel ID** and the **Conversions API Token**, then click **Save**.

***

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

> Open your **Text Agent** → go to the **Conversation Analysis** tab → expand the **Meta Ad Conversions** panel.

The credential is the switch. The panel only shows the conversion settings once your workspace has a Meta Ads credential — until then it offers **Add credential** and nothing else. There is no separate on/off toggle. Members who can't edit the agent see **No Meta Ads credential in this workspace yet.** instead of the button.

**Step 1:** Connect the credential, or confirm it is there. If the panel shows **Add credential**, click it, fill in the same dialog described in Part 1 and click **Save**. Once connected, the panel shows the credential's name with a check mark.

> 💡 If the panel says **We couldn't check your Meta Ads credentials.**, click **Try again** — the lookup failed; it does not mean you have no credential.

**Step 2:** Choose the **Conversion event** that best describes your goal. Picking an event is what turns conversions on for this agent. 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) Fill in **When to count it as a conversion**. This is a short instruction that tells Dapta's AI when a finished conversation qualifies as the event you selected. The box starts empty: leave it empty and Dapta applies its built-in rule for the event you chose; write your own rule when your use case needs a more specific definition.

Changes in this panel are saved automatically: the event as soon as you pick it, and the rule when you click outside the box. There is no **Save** button.

**Turning it off:** clear the **Conversion event** field. The agent stops reporting conversions, and the rule you wrote is kept — choosing an event again turns it back on with the same rule.

**Removing the credential:** click **Remove** next to the credential's name and confirm with **Remove credential**. This deletes the credential from the whole workspace and clears this agent's event and rule. Other agents and flows keep their settings, but they stop reporting conversions unless your workspace still has another active Meta Ads credential.

***

#### 💡 Good to know

**How conversion detection works:** Only conversations that started from a Click-to-WhatsApp ad carry the click identifier that Meta requires. When a qualifying conversation ends, Dapta's AI reviews its post-conversation analysis — the summary, variables and evaluation — against your rule. If the goal was met, **one** conversion event is sent to Meta for that conversation session; a deduplication guard prevents double-counting, even if the session is re-processed. If the same contact later starts a new session from another ad click, that session can report its own conversion.

**Attribution:** Dapta sends each event with the click identifier of the ad that started the conversation. The attribution window is set in your Meta ads settings, not in Dapta.

**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.

***

{% 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.
