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

# Meta Ads

> Integrating Meta Ads with our platform enables seamless synchronization of your advertising data, enhancing marketing analysis and insights.

### Supported data types

> [card] Marketing cost
>
> Ad spend and performance metrics

> [card] Product cost
>
> Product-level advertising costs

> [card] Creatives
>
> Ad creative assets and thumbnails

## Prerequisites

* Access to your Meta Ads account
* Authorization to integrate Meta Ads with third-party platforms

## Step-by-step integration guide

**1. Navigate to integrations**

Go to **Settings** on our platform, then click on **Integrations**.

**2. Connect Meta Ads**

Find Meta Ads in the list of integrations and click **Connect** on that row.

**3. Authorize access**

You will be prompted with the Facebook login window. Enter your credentials, log in, and click **Connect** to authorize our platform to access your Meta Ads data.

**4. Select ad accounts**

After authorization, select the Meta ad account IDs you want to import data from.

> [!TIP]
>
> **Connect all accounts — including inactive ones** — We automatically fetch your history (by default back to **January 1, 2023**). For accurate forecasting, modeling, and cohort analytics, we rely on at least two years of data, so connect any old or inactive accounts too — the more history, the better our models perform.

### Data collected

This integration fetches the following data from your Meta Ads account:

* Account information
* Currency and timezone
* Date of data
* Campaign ID and name
* Ad set ID and name
* Ad ID and name
* Channel (`facebook`) and channel group (`social_ppc`) — assigned automatically
* Country
* Conversion value, clicks, conversions, and impressions
* Ad creative assets and thumbnails

> [!NOTE]
>
> For our Meta Ads integration, we prioritize accuracy by using the order date instead of the impression or click date. By default, the integration uses each ad set's configured attribution window. If no window is set, it falls back to 7-day click and 1-day view attribution.

## Business portfolios and storefronts

If your account uses Facebook Login for Business, Dema connects Meta per Meta business portfolio instead of per storefront. Each login reaches one business portfolio. You connect, reconnect, and disconnect each portfolio on its own, and you can add more portfolios later.

After you connect a portfolio, you map each ad account it reaches to one storefront, or leave the account unused. This choice decides which storefront receives that account's spend, so check it carefully.

* An ad account that already feeds another Meta connection can't be mapped again. This prevents the same spend from being counted twice.
* If an ad account currently feeds an older per-storefront Meta connection, saving the mapping moves the account to the portfolio. Dema switches off the older connection once it has no accounts left.
* A storefront left without mapped accounts stops receiving cost from that portfolio.
* Disconnecting a portfolio stops Meta data for every storefront it feeds.

Accounts that use personal Facebook login keep the per-storefront flow described above.

### Finalizing integration

After completing the authorization process, our system will automatically start fetching the specified data from your Meta Ads account. You can view and analyze this data in our platform to gain insights into your advertising performance and make data-driven decisions for optimizing your marketing strategies.

## Troubleshooting and support

If you encounter any issues during the integration process or have questions regarding your data, please contact our support team for assistance.

## Additional resources

For more information on managing your Meta Ads account and understanding the available metrics, visit the [Meta Business Help Center](https://www.facebook.com/business/help).

***


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