The Marketing Mix Modeling Breakdown on Insights API is a self-service data extraction option that clients can use in order to export Meta ads data quickly and easily for marketing mix modeling without going through a Meta Marketing Science Partner or third-party agencies and mobile measurement partners.
The API calls are built into the Insights API using the breakdowns=mmm
parameter. Unlike other breakdowns, it doesn't support combination with other breakdowns
or action_breakdowns
.
The responses contain similar metrics and breakdowns as results from the Marketing Mix Modeling Data Export in Ads Reporting. Marketing mix modeling data is available only on the ad set level, which is the default behavior (equivalent to the level=adset
parameter). Currently the supported metrics for marketing mix modeling data are impressions
and spend
. Note: spend
is an estimated metric. To learn more, see Insights API, Estimated and Deprecated Metrics.
To call the Insights API you need the ads_read
permission for your given ad account.
To get the marketing mix modeling data:
curl \
-F "access_token=ACCESS_TOKEN" \
-F "breakdowns=mmm" \
"https://graph.facebook.com/v21.0
/act_AD_ACCOUNT_ID/insights"
The Insights API uses default values for parameters not specified in the call. We recommend using the time_range
and date_preset
parameters. The granularity of the response can be increased further by using time_increment
.
This API call gets the daily marketing mix modeling data for the last week:
curl \
-F "access_token=ACCESS_TOKEN" \
-F "breakdowns=mmm" \
-F "date_preset=last_7d" \
-F "time_increment=1” \
"https://graph.facebook.com/v21.0
/act_AD_ACCOUNT_ID/insights"
For more information about the Insights API and how to onboard to the Marketing API see the Insights API Quickstart.
A common use case would be to retrieve marketing mix modeling data for a single Business Manager. This operation isn't directly supported because the Insights API works on the ad account level and below.
owned_ad_accounts
and client_ad_accounts
endpoints.
curl \
-F "access_token=ACCESS_TOKEN" \
"https://graph.facebook.com/v21.0
/BUSINESS_ID/owned_ad_accounts"
curl \
-F "access_token=ACCESS_TOKEN" \
"https://graph.facebook.com/v21.0
/BUSINESS_ID/client_ad_accounts"
The granularity of marketing mix modeling data causes the response to have a great number of records as well as large record size. This can cause your requests to time out during computation. To mitigate this, decrease the size of the request by using time_range
and filtering
and query for the total time range in sections. To learn more, see Insights API Limits & Best Practices.
For this release there is only a specific filtering
supported for querying the marketing mix modeling data. Only these listed operator combinations are allowed for a field, and other usages of filtering
will return an error.
Field | Allowed Operators |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We recommend leveraging the Marketing Mix Modeling Data Export in Ads Reporting to export historical data if the API is not needed.
Alternatively, you can use the Insights API Asynchronous Jobs flow. This creates a job that computes the data in an asynchronous fashion. The endpoint responds with the id
of an Ad Report Run, which you can query for the job status and to retrieve the computed data. However, note that some requests can time out even as an asynchronous job. For more information, see Insights API Asynchronous Jobs.
Please note that this release may have slightly different column header mappings and column header ordering than the Marketing Mix Modeling Data Export in Ads Reporting. Additionally, you have full flexibility to join the Marketing Mix Modeling Breakdown's default data with other tables queried from the API.
Column Index | Default Column Headers from Marketing Mix Modeling Breakdown |
---|---|
0 |
|
1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|