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

# Connect Meta Conversion Leads

> Tell Meta which of your Facebook leads became customers, so your lead ads are delivered to people more likely to buy.

Left alone, Meta shows your lead ads to whoever is most likely to fill in the form, whether or not they ever buy. Conversion Leads changes what it optimises for. DMLY tells Meta how each lead turned out: that they reached a stage in your pipeline, or became a client. Meta then looks for more people like the ones who did.

This builds on [Facebook lead forms](/channels/facebook-lead-forms): only people who came in through one of your lead forms are reported.

## Before you start

* Your Facebook Page is capturing leads in DMLY. See [Capture Facebook lead forms](/channels/facebook-lead-forms).
* Your plan includes **Meta Ads**. Without it the tile shows **Plan locked**. See [Plans](/billing/plans).
* You have a **CRM dataset** in Meta Events Manager for your lead ads, or can create one. Meta calls it a dataset; older screens call it a pixel.&#x20;
* Your pipeline stages describe your sales funnel. They're what DMLY reports. See [Pipeline stages](/contacts/pipeline-stages).

## Connect it

<Steps>
  <Step title="Get the dataset ID and a token">
    In Meta Events Manager, open the CRM dataset you use for your lead ads and copy its dataset ID. Then, in that dataset's settings under **Conversions API**, generate an access token.
  </Step>

  <Step title="Open the tile">
    Go to **Integrations**, open the **Advertising** tab and select **Meta Conversion Leads**.
  </Step>

  <Step title="Paste and connect">
    Enter the **Dataset ID** and the **Conversions API access token**, then select **Connect**. DMLY checks both with Meta before saving: a wrong ID or a token that can't reach the dataset is refused there and then, and nothing is saved as connected.
  </Step>

  <Step title="Choose what to optimise for">
    Back in Events Manager, set up Conversion Leads on the dataset and choose the stage your lead ads should optimise for. Meta needs a few days of events before it lets you choose.
  </Step>
</Steps>

<Tip>
  To try it without touching your real ad data, put the code from Events Manager's **Test events** tab into **Test event code**. Events then show up there instead of counting toward your ads. Clear the field when you've finished testing.
</Tip>

## What DMLY sends

For each person who came in through a Facebook lead form in the last 90 days:

| When | Event name Meta sees |
| - | - |
| The lead is captured | `Lead` |
| They move to a pipeline stage | The stage's own name, for example `Qualified` |
| They become a client | `Converted` |

Each one goes once per lead. Moving someone back into a stage they've already been in doesn't send it again. Every event carries the lead's ID from Meta, plus the person's email and phone number hashed, which is how Meta matches it to the lead.

Contacts who didn't come in through a lead form are never reported, whatever stage they reach.

<Note>
  A stage move is reported however it happens: from the contact's profile, the pipeline board, a bulk action, the API, an automation step or the AI agent. Three things change a stage without reporting it, because none of them is the contact moving through your funnel: a CSV import filling in a stage, deleting a stage, and merging two contacts.
</Note>

The panel shows the last 7 days: how many events were **Sent**, **Failed** and **Waiting**, with the most recent failure in Meta's own words.

## When Meta refuses the token

If Meta stops accepting the token (it was revoked, or it lost access to the dataset), the tile turns to **Error**, the panel shows what Meta said, and your workspace admins get one email asking them to reconnect. Generate a new token in Events Manager, paste it in, and save.

Meta only accepts an event up to 7 days after it happened, so events that fail for longer than that can't be sent later.

## Next

<Columns cols={2}>
  <Card title="Capture Facebook lead forms" icon="clipboard-list" href="/channels/facebook-lead-forms">
    Where the leads come from.
  </Card>

  <Card title="Pipeline stages" icon="bars-progress" href="/contacts/pipeline-stages">
    The funnel DMLY reports, stage by stage.
  </Card>

  <Card title="Ads report" icon="rectangle-ad" href="/analytics/ads-report">
    Leads and cost per lead, ad by ad.
  </Card>

  <Card title="Meta Ads" icon="facebook" href="/broadcasts/marketing-messages#connect-your-meta-ad-account">
    Connect your ad account for spend and cost.
  </Card>
</Columns>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.