> 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. The WhatsApp Business account behind your line must also be connected to that dataset in Events Manager. 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))
* The **WhatsApp Business account** behind your line **connected to that dataset** in Events Manager. Without that connection, Meta rejects every conversion Dapta sends. Meta explains how datasets and WhatsApp Business accounts work together in its [Conversions API for Business Messaging](https://developers.facebook.com/documentation/ads-commerce/conversions-api/business-messaging) guide.

***

#### 🔐 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. Check that the WhatsApp Business account behind your line is connected to this same dataset.

**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 submitted** — the contact shared their contact details, asked to be contacted, or asked to move forward with your product or service
* **Purchase** — the contact completed a purchase or an order, and it was confirmed in the conversation
* **Checkout started** — the contact chose a specific product, with its price or quantity, and said they were ready to buy or asked to pay
* **Add to cart** — the contact picked a specific product they want, such as a size, a model or a variant
* **Content viewed** — the contact asked about, or was shown, the details of a specific product, such as its price, features or availability

> 💡 **Tip:** These are events Meta accepts for conversations that start from a Click-to-WhatsApp ad, and they tell Meta which result to optimize your ads for. For a lead-generation campaign, choose **Lead submitted**.

{% hint style="warning" %}
The list used to offer **Lead**, **Contact**, **Schedule**, **Complete registration** and **Submit application**. Meta doesn't accept those events for WhatsApp conversations, so an agent still set to one of them reports no conversions until you choose an event from the list above.
{% endhint %}

**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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
