Get targeting analytics for campaigns

GET {{baseUrl}}/ad_accounts/:ad_account_id/campaigns/targeting_analytics?campaign_ids=978&start_date=<date>&end_date=<date>&targeting_types=LOCATION&columns=SPEND_IN_MICRO_DOLLAR,IMPRESSION_2&granularity=TOTAL&click_window_days=30&engagement_window_days=30&view_window_days=1&conversion_report_time=TIME_OF_AD_ACTION&attribution_types=INDIVIDUAL

Get targeting analytics for one or more campaigns. For the requested account and metrics, the response will include the requested metric information (e.g. SPENDINDOLLAR) for the requested target type (e.g. age_bucket) for applicable values (e.g. 45-49).

- The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Campaign Manager. - If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days. - If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days.

Request Params

KeyDatatypeRequiredDescription
campaign_idsnumber(Required) List of Campaign Ids to use to filter the results.
start_datestring(Required) Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today.
end_datestring(Required) Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date.
targeting_typesstring(Required) Targeting type breakdowns for the report. The reporting per targeting type <br> is independent from each other.
columnsstring(Required) Columns to retrieve, encoded as a comma-separated string. NOTE: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned
granularitystring(Required) TOTAL - metrics are aggregated over the specified date range.<br> DAY - metrics are broken down daily.<br> HOUR - metrics are broken down hourly.<br>WEEKLY - metrics are broken down weekly.<br>MONTHLY - metrics are broken down monthly
click_window_daysnumberNumber of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to 30 days.
engagement_window_daysnumberNumber of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to 30 days.
view_window_daysnumberNumber of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to 1 day.
conversion_report_timestringThe date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.
attribution_typesstringList of types of attribution for the conversion report

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{}