Get ad analytics
GET {{baseUrl}}/ad_accounts/:ad_account_id/ads/analytics?start_date=<date>&end_date=<date>&ad_ids=34021122655&columns=TOTAL_CONVERSIONS,AD_ID&granularity=WEEK&click_window_days=30&engagement_window_days=30&view_window_days=1&conversion_report_time=TIME_OF_AD_ACTION
Get analytics for the specified ads in the specified adaccountid
, filtered by the specified options.
- 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
Key | Datatype | Required | Description |
---|---|---|---|
start_date | string | (Required) Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today. | |
end_date | string | (Required) Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date. | |
ad_ids | number | (Required) List of Ad Ids to use to filter the results. | |
columns | string | (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 | |
granularity | string | (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_days | number | Number 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_days | number | Number 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_days | number | Number 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_time | string | The 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. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
[{"AD_ID":"53984","DATE":"\u003cdate\u003e"},{"AD_ID":"73","DATE":"\u003cdate\u003e"}]