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

# Meta Ads integration

> Connect Meta Ads to Cometly to see Facebook and Instagram ad spend, tie each conversion to the ad that drove it, and send conversions back to Meta.

When you connect Meta Ads to Cometly, your Facebook and Instagram campaigns, ad sets and ads appear in the Cometly **Ads Manager** with their spend and performance. You sign in with your Facebook profile, then choose which ad accounts report into your space (the workspace in Cometly that holds one business's data).

With the ad data in place, Cometly can attribute each conversion (a lead or sale) to the ad that drove it, so you can see which Meta ads are worth their spend. Once connected, you can also send conversions back to Meta through the Conversion API, a server-side connection that gives Meta the conversion data it uses to optimize your ads.

## Before you start

* **A Facebook profile with access to the ad accounts you want to track.** Cometly lists the ad accounts that profile can access in Meta.
* **The Administrator or Advertiser role in the Cometly space.** A Viewer cannot connect ad accounts. See [Space roles](https://docs.cometly.com/guides/account/space-roles.md).
* **The Cometly pixel on your landing pages.** The pixel is the tracking script that records the visitors who reach your site. See [Install the pixel](https://docs.cometly.com/getting-started/install-pixel.md).

> [!NOTE]
>
> Each Cometly user can connect one Facebook profile. Signing in with a different Facebook profile replaces the first one and disconnects the ad accounts connected through it.

## Connect Meta Ads

**1. Open the Meta Ads row**

In the left sidebar, click **Integrations**. Under **Ad Platforms**, find the **Meta Ads** row.

**2. Sign in with Facebook**

Click **Sign in with Facebook**. A window opens. Log in to Facebook and approve the access Cometly asks for: your ads, your Pages and their lead forms, and your businesses. If you run lead form ads, see [Meta lead form tracking](https://docs.cometly.com/integrations/forms/meta-lead-forms.md) for which business and Pages to select.

When the window shows **Your profile was synced successfully**, click **Done**.

**3. Connect your ad accounts**

The row expands and shows your profile (for example **Jane Doe's Meta Profile**) with an **Ad Accounts** table. Use **Search ad account** to find an account.

Make sure you are in the space the ad account should report into, then click **Connect & Sync Data** next to it.

## Check it worked

You see the message **Ad Account Connected - Data will sync in 30-60 minutes**, and the ad account shows **Connected** with the space name in the **Space** column. It is also listed in the **Connected Meta Ad Accounts** card, with the name of who connected it.

Profile connections are personal: only you can see and manage yours. An ad account can be connected to one space at a time. See [Same ad account in two spaces](https://docs.cometly.com/support/troubleshooting/ad-accounts/same-ad-account-in-two-spaces.md).

## Add Cometly's URL parameters

Every Meta ad you want to track needs these URL parameters:

```text theme={null}
comet_source={{site_source_name}}&comet_ad_id={{ad.id}}&comet_placement={{placement}}
```

![Setup step 4, Add URL parameters to your ads, with Meta Ads selected, showing the Meta Ads URL parameters and the Copy Parameters button.](https://mintcdn.com/cometly/BM7eSn6-ecx8ZzBx/images/integrations/ad-platforms/meta/02.webp?fit=max\&auto=format\&n=BM7eSn6-ecx8ZzBx\&q=85\&s=8e384c54d2b604114948d7bf70af66ab)

In Meta Ads Manager, paste them into the **URL parameters** box in the **Tracking** section of each ad. To copy them in Cometly, open **Setup**, step 4 **Add URL parameters to your ads**, select **Meta Ads** and click **Copy Parameters**. For the full walkthrough, see [Meta Ads URL parameters](https://docs.cometly.com/getting-started/url-parameters.md#meta-ads-url-parameters). Some formats need extra steps: [carousel ads](https://docs.cometly.com/guides/url-parameters/meta-carousel-ads.md), [catalog ads](https://docs.cometly.com/guides/url-parameters/meta-catalog-ads.md) and [existing post ads](https://docs.cometly.com/guides/url-parameters/meta-existing-post-ads.md).

Cometly does not add the parameters to your Meta ads for you, but it checks them on every sync. An ad is flagged when `comet_ad_id={{ad.id}}` is neither in its URL parameters nor on its website link. Ads with no website link (for example lead form, Messenger or WhatsApp ads) are not flagged. Flagged ads get a red dot with the tooltip **UTM Setup Error** on the **Ads** tab of Ads Manager (the **Tracking Status** column preset shows each ad's **Ad Links**, **URL Params** and **Tracking Status**). They are also counted in **Setup** step 4 and raise a **Tracking Error: Meta** notification with the buttons **View affected ads** and **Copy Parameters**, which clears on its own once every running ad carries the parameters. See [Fix UTM Setup Errors](https://docs.cometly.com/support/troubleshooting/url-parameters/utm-setup-errors.md).

## Send conversions back (Conversion API)

In **Events Manager**, open the **Conversion API** tab and expand the **Meta** row. Under **Master Data Sharing Settings** you choose **Turn off data sharing**, **Send only attributed events** or **Send all events**, select a **Meta ad account** and **Pixel ID**, and add custom rules for specific events. See [Configure the Meta Conversion API](https://docs.cometly.com/guides/conversion-api/meta.md).

If the events do not arrive in Meta, see [Conversion API not sending events to Meta Events Manager](https://docs.cometly.com/support/troubleshooting/conversion-api/meta-capi-not-sending-events.md).

## What to expect after connecting

* **First data.** Active campaigns start populating data within 30 to 60 minutes of connecting an ad account. In Ads Manager, a Meta ad account has the tabs **Campaigns**, **Ad Sets** and **Ads**.
* **Refresh.** Cometly refreshes Meta ad data every 60 minutes and pulls the previous two days again each day, so late changes from Meta are captured. See [How often data updates in Cometly](https://docs.cometly.com/support/troubleshooting/ad-data/data-update-frequency.md).
* **Existing campaigns.** Campaigns that were running before you connected may need tracking turned on under **Settings**, **Campaign tracking**. New campaigns are tracked automatically while **Auto-track new campaigns** is on. See [Manually turn on tracking for your ad campaigns](https://docs.cometly.com/support/troubleshooting/ad-data/manually-turn-on-tracking.md).
* **Row status.** **Last Synced** is when your Facebook connection was last refreshed (you signed in or clicked **Resync**), not the last data refresh. The status is **Connected**, or **Connection Issue, Resync Required** when Cometly cannot load your ad accounts from Meta.
* **Resync and Disconnect.** **Resync** opens the Facebook sign-in again to refresh the connection. **Disconnect** at the top of the row removes your profile and every ad account connected through it. **Disconnect** next to an ad account removes only that account from its space. Data stops tracking immediately. See [Disconnect an ad platform connection](https://docs.cometly.com/support/troubleshooting/ad-accounts/disconnect-an-ad-platform.md).

## Troubleshooting

### "Connection Issue, Resync Required" or "Action Required: Resync Meta Connection"

Cometly has stopped receiving Meta ad data for the space. The alert arrives by email and in-app notification. The user who connected the profile needs to open **Integrations**, expand **Meta Ads** and click **Resync**. When data flows again you get a **Meta Connection Restored** notification, and the past 48 hours are restored automatically. If the problem returns, Meta may be throttling the profile: see [Meta ad account data not updating](https://docs.cometly.com/support/troubleshooting/ad-data/meta-ad-data-not-updating.md). For other causes of stale data, see [Ad data not syncing for hours or days](https://docs.cometly.com/support/troubleshooting/ad-data/ad-data-not-syncing.md).

### "Action Required: Restore Meta Account Access"

Meta is refusing access to one ad account because the connected Facebook profile no longer has permission on it. Resyncing does not help. Restore that profile's access to the ad account in Meta, or have a Cometly user whose Facebook profile has access connect it.

### "Action Required: Unblock Your Meta Login"

Meta has put a hold on the connected Facebook login (a security check, or an account Meta lists as unconfirmed). Resyncing does not help. The owner of that login needs to log in to Facebook and complete what it asks for. Syncing resumes on its own once Meta lifts the hold.

### An ad account is missing from the Ad Accounts table

The table only lists ad accounts the connected Facebook profile can access. Get access to the ad account in Meta, then reload the **Integrations** page. If your profile no longer has access to a connected ad account when the table loads, Cometly disconnects that account from its space.

## Frequently asked questions

### Does Cometly import historical Meta Ads data from before I connected?

Not retroactively. Cometly tracks a campaign from the moment its tracking is turned on, and from that point forward. See [Tracking historical ad data](https://docs.cometly.com/support/troubleshooting/ad-data/historical-ad-data.md).

### Why does Cometly show fewer conversions than Meta Ads Manager?

Meta includes view-through conversions, which count people who saw your ad without clicking it. Cometly uses click-based attribution, so it counts only conversions that followed a click on your ad. See [Why Cometly attribution differs from Meta Ads Manager](https://docs.cometly.com/support/troubleshooting/reporting/attribution-differs-from-meta.md).

### Can my team see the Meta ad accounts I connect to Cometly?

Yes. Everyone in the space can see a connected ad account in the **Connected Meta Ad Accounts** card, along with who connected it. Your Facebook profile connection stays personal: only you can see and manage it.

## Next steps

* [Configure the Meta Conversion API](https://docs.cometly.com/guides/conversion-api/meta.md) to send your conversions back to Meta.
* [Missing Meta campaigns, ad sets or ads in Ads Manager](https://docs.cometly.com/support/troubleshooting/ad-data/missing-meta-campaigns.md)
* [Why Cometly attribution differs from Meta Ads Manager](https://docs.cometly.com/support/troubleshooting/reporting/attribution-differs-from-meta.md)
* [Amount spent in Cometly differs slightly from Meta](https://docs.cometly.com/support/troubleshooting/ad-data/amount-spent-differs-from-meta.md)
* [Settings for managing Meta ads in Cometly](https://docs.cometly.com/support/troubleshooting/ad-data/meta-ads-management-settings.md)

Still have questions or need a hand? We're happy to help. Reach our team at [support@cometly.com](mailto:support@cometly.com).


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