Skip to main content
The Meta Ads live data source reads one Meta ad account. Lightdash turns each query into a Marketing API Insights request and shows the results Meta returns. Ad data stays in Meta. It’s a level 3 integration: its API returns reports.

Before you start

  • Live data sources enabled for your organization. See Live data sources.
  • Admin role in the Lightdash project.
  • Your ad account ID: the number after act= in your Ads Manager URL.
  • A system user access token with only the ads_read permission. To create one:
    1. In Meta Business settings, add a system user and assign it your ad account with View performance access.
    2. In Meta for Developers, create a Business app in the same business portfolio and add the Marketing API product.
    3. On the system user, click Generate new token, choose the app, select ads_read, and set the token to never expire.

Connect Meta Ads

  1. On the nav bar, click Browse → Semantic Layer.
  2. In the sidebar, select Live data sources, then click Add.
  3. Select Meta Ads.
  4. Enter a Name, such as Meta Ads. People see this name in Explore and agents use it to refer to the source.
  5. Enter the Ad account ID and Access token, then click Test connection.
  6. Click Add source.
Lightdash adds an Insights table to Explore.

Dimensions

Age and gender, location, and placement can’t be combined in one query. Meta doesn’t report those breakdowns together.

Metrics

Conversion metrics use Meta’s default attribution: 7-day click and 1-day view. This can differ from an ad set’s own attribution setting, so numbers can differ from Ads Manager. A blank value means Meta reported nothing for that row.

Supported features

To filter by a campaign, ad set or ad, include that field or a finer one in the query. For example, add Campaign name before you filter by it.

Limits

When a query has more than 5,000 rows, Lightdash shows an error rather than a partial result. Narrow the date range, add a filter or remove a dimension.

Example questions

  • “Spend and purchases by campaign over the last 30 days.”
  • “Top 10 ads by spend this month.”
  • “Impressions and link clicks by age and gender last week.”

Troubleshooting

Meta rejected the access token. Generate a new system user token with ads_read and update the source. Meta denied access to the ad account. Check that the system user is assigned to this ad account and that the token includes ads_read. Numbers don’t match Ads Manager. Check the date range and time zone first. For conversions, compare against the 7-day click and 1-day view attribution setting in Ads Manager.