AdInsightsActions
Query an Ad Report. Accessing Ad Report information requires the ads_read permission.
Table Specific Information
AdInsightsActions represents a breakdown of the Actions column from the AdInsights. See AdInsights for general information on querying AdInsights.
Select
When requesting AdInsightsActions, always include a Target. The Target specifies the element from which to retrieve the insights. Legal Targets are AdAccount, Campaign, AdSet, or an Ad. For example:SELECT * FROM AdInsightsActions WHERE Target = 'act_123456'Columns that are always fetched by default during a SELECT * query against Adinsightsactions:
- Target
- DateStart
- DateEnd
- AdAccountId
- AdAccountName
Metrics Columns
When running a SELECT * query on an Adinsightsactions report, not all of the metrics columns are retrieved from Facebook. This means that certain columns may return “0” or null values if column metadata is retrieved in a prior request.Metrics columns that may display this behavior in Adinsightsactions include:
- ActionType
- ActionValue
- Action1dClick
- Action1dView
- Action7dClick
- Action7dView
- Action28dClick
- Action28dView
- ActionDDA
ActionAttributionWindows
To input a comma-separated list of attribution windows, use ActionAttributionWindows. For example:SELECT * FROM AdInsightsActions WHERE Target = 'act_123456' AND level = 'ad' AND ActionAttributionWindows = '1d_view,7d_view,28d_click'
ActionCollection
To identify a specific collection to retrieve from AdInsightsActions, use ActionCollection. If no collection is specified, the driver uses Actions by default. Each input represents an available column from AdInsights where a collection of actions would return.To identify multiple collections, use ActionCollection with the IN clause.
For example:
SELECT * FROM AdInsightsActions WHERE Target = 'act_123456' AND ActionCollection = 'UniqueActions'
SELECT * FROM AdInsightsActions WHERE Target = 'act_123456' AND ActionCollection IN ('Actions', 'UniqueActions')
Breakdown Columns
Just as in the available selection criterias from AdInsights, breakdowns are available for the Adinsightsactions report. For further information about breakdowns, see AdInsights.Additional breakdowns available for AdInsightsActions include:
- ActionType
- ActionCanvasComponentName
- ActionCarouselCardId
- ActionCarouselCardName
- ActionDestination
- ActionDevice
- ActionLinkClickDestination
- ActionReaction
- ActionTargetId
- ActionVideoSound
- ActionVideoType
Managing Query Size
Sometimes if a query is too large for Facebook to process on its end, you might receive this error: Please reduce the amount of data you're asking for, then retry your request. The error appears to be triggered by individually dense fields, and not the page size.
If the cmdlet encounters this error when first executing certain types of queries, the driver attempts to retry the query at the next lowest level of ad object, down to the level defined in RetryLevel, as long as the query does not include the Level parameter. (If the Level parameter is specified in a query, the driver does not attempt to retry beyond the ad object level specified by Level. For further information, see RetryLevel.) Note that since spreading queries across more granular ad objects increases the number of requests executed for the query, it can decrease query performance.
If you continue to receive this error, try either reducing the date range of the query, or removing expensive columns.
A good method for finding and removing expensive columns is to use a binary search by removing half of the columns you are selecting and retrying the query. If you get the same error, reduce the remaining columns by half and try again. If you do not get an error, add back half of the columns you just removed, and try again.
Columns
Name | Type | Description |
Target | String | The Id of the Account, Campaign, Ad Group, or Ad to get insights for. |
DatePreset | String | An alternative to specifying the DateStart and DateEnd. A date range will automatically be calculated based on the specified preset value.
The allowed values are maximum, today, yesterday, this_week_sun_today, this_week_mon_today, last_week_sun_sat, last_week_mon_sun, last_3d, last_7d, last_14d, last_28d, last_30d, last_90d, this_month, last_month. |
DateStart | Date | The starting date to retrieve insights for. In the Facebook UI, this is the Report Start field. In the Facebook UI, this is the Report Start field. |
DateEnd | Date | The ending date to retrieve insights for. In the Facebook UI, this is the Report End field. In the Facebook UI, this is the Report End field. |
TimeIncrement | String | The number of days of data aggregation. An int (1-90) or one of monthly or all_days. This value splits the range or preset date into smaller increments.
The default value is 1. |
Level | String | The level to represent the results at.
The allowed values are ad, adset, campaign, account. |
ActionAttributionWindows | String | A comma separated list which determines what is the attribution window for the actions. For example, 28d_click means the API returns all actions that happened 28 days after someone clicked on the ad. The default option means [1d_view,7d_click]. Possible values include 1d_view, 7d_view, 28d_view, 1d_click, 7d_click, 28d_click, default. |
ActionCollection | String | The action collection to retrieve. The available values are: ActionValues, Actions, AdClickActions, AdImpressionActions, CatalogSegmentActions, CatalogSegmentValue, CatalogSegmentValueMobilePurchaseRoas, CatalogSegmentValueOmniPurchaseRoas, CatalogSegmentValueWebsitePurchaseRoas, ConversionValues, Conversions, ConvertedProductQuantity, ConvertedProductValue, CostPer15_secVideoView, CostPer2SecContinuousVideoView, CostPerActionType, CostPerAdClick, CostPerConversion, CostPerOneThousandAdImpression, CostPerOutboundClick, CostPerStoreVisitAction, CostPerThruplay, CostPerUniqueActionType, CostPerUniqueConversion, CostPerUniqueOutboundClick, InteractiveComponentTap, MobileAppPurchaseRoas, OutboundClicks, OutboundClicksCtr, PurchaseRoas, StoreVisitActions, UniqueActions, UniqueConversions, UniqueOutboundClicks, UniqueOutboundClicksCtr, UniqueVideoView15_sec, Video15_secWatchedActions, Video30_secWatchedActions, VideoAvgTimeWatchedActions, VideoContinuous2SecWatchedActions, VideoP100_watchedActions, VideoP25WatchedActions, VideoP50WatchedActions, VideoP75WatchedActions, VideoP95WatchedActions, VideoPlayActions, VideoPlayCurveActions, VideoPlayRetention0To15SActions, VideoPlayRetention20_to60SActions, VideoPlayRetentionGraphActions, VideoTimeWatchedActions, WebsiteCtr, WebsitePurchaseRoas
The default value is Actions. |
AdAccountId | String | The Id of the Ad Account associated with the report row. |
AdAccountName | String | The name of the Ad Account associated with the report row. |
CampaignId | String | The Id of the Campaign associated with the report row. |
CampaignName | String | The name of the Campaign associated with the report row. |
AdSetId | String | The Id of the Ad Set associated with the report row. |
AdSetName | String | The name of the Ad Set associated with the report row. |
AdId | String | The Id of the Ad associated with the report row. |
AdName | String | The name of the Ad associated with the report row. |
ActionType | String | The kind of actions taken on your ad, Page, app or event after your ad was served to someone, even if they didn't click on it. |
ActionValue | Integer | Metric value of default attribution window. |
Action1dClick | String | Metric value of attribution window 1 day after clicking the ad. |
Action1dView | String | Metric value of attribution window 1 day after viewing the ad. |
Action7dClick | String | Metric value of attribution window 7 days after clicking the ad. |
Action7dView | String | Metric value of attribution window 7 days after viewing the ad. |
Action28dClick | String | Metric value of attribution window 28 days after clicking the ad. |
Action28dView | String | Metric value of attribution window 28 days after viewing the ad. |
ActionDDA | String | Metric value of attribution window which is powered by data driven model. |
ActionCanvasComponentName | String | Name of a component within a Canvas ad. |
ActionCarouselCardId | String | The ID of the specific carousel card that people engaged with when they saw your ad. |
ActionCarouselCardName | String | The specific carousel card that people engaged with when they saw your ad. The cards are identified by their headlines. |
ActionConvertedProductId | String | Converted product ids - for Collaborative Ads. |
ActionDestination | String | The destination where people go after clicking on your ad. |
ActionDevice | String | The device on which the conversion event you are tracking occurred. |
ActionReaction | String | The number of reactions on your ads or boosted posts. |
ActionTargetId | String | The id of destination where people go after clicking on your ad. |
ActionVideoSound | String | The sound status (on/off) when user watches your video ad. |
ActionVideoType | String | Video metrics breakdown. |
Age | String | The age range for the metrics in this row. This is a breakdown column and selecting this column will cause results to be further broken down by this metric. |
Country | String | The country for the metrics in this row. This is a breakdown column and selecting this column will cause results to be further broken down by this metric. |
DevicePlatform | String | The device or platform used for viewing the ad. This is a breakdown column that may not be selected with other breakdown columns. |
DMA | String | The designated marketing area. This is a breakdown column that may not be selected with other breakdown columns. |
FrequencyValue | String | The number of times an ad in your Reach and Frequency campaign was served to each person. This is a breakdown column and selecting this column will cause results to be further broken down by this metric. |
Gender | String | The gender for the metrics in this row. This is a breakdown column and selecting this column will cause results to be further broken down by this metric. |
HStatsByAdvertiserTZ | String | Time period over which the stats were taken for the advertiser. This is a breakdown column and selecting this column will cause results to be further broken down by this metric. |
HStatsByAudienceTZ | String | Time period over which the stats were taken for the audience. This is a breakdown column and selecting this column will cause results to be further broken down by this metric. |
ImpressionDevice | String | The devices used to view the Ad. This is a breakdown column and selecting this column will cause results to be further broken down by this metric. |
PlacePageId | String | The place page used if applicable. This is a breakdown column that may not be selected with other breakdown columns. |
PlatformPosition | String | The position on the platform. |
ProductId | String | The product Id advertised in the Ad. This is a breakdown column and selecting this column will cause results to be further broken down by this metric. |
PublisherPlatform | String | The platforms the ads were published on. |
Region | String | The region someone viewed the Ad from. This is a breakdown column and selecting this column will cause results to be further broken down by this metric. |
AdEffectiveStatus | String | An input only list of supported statuses when retrieving insights at a level lower than the Ad Account. See the values listed on AdStatus for an example of valid values. |
UseAsync | Boolean | A boolean indicating if an asynchronous call should be used for retrieving the insights. |