You can get a list of assets and their attributes by sending a Google Ads Query
Language (GAQL) query to the GoogleAdsService. Assets
are represented by the
asset entity, which exposes a number
of asset-specific fields.
The following GAQL query lists all assets in an advertiser's account along with their resource name and type.
SELECT asset.id, asset.name, asset.resource_name, asset.type FROM asset
For example, the following query lists the YouTube video IDs for all
YoutubeVideoAsset objects in an account by
asset.type value (see the
documentation for a list of possible type values) for
SELECT asset.id, asset.name, asset.resource_name, asset.youtube_video_asset.youtube_video_id FROM asset WHERE asset.type = 'YOUTUBE_VIDEO'
Asset metrics are made available through a few resources:
With these resources, asset metrics can be queried at each respective level.
For instance, when querying the
ad_group_asset resource, the
field can be used to segment the results, thereby retrieving metrics for each
unique combination of
SELECT ad_group.id, asset.id, metrics.clicks, metrics.impressions FROM ad_group_asset WHERE segments.date DURING LAST_MONTH ORDER BY metrics.impressions DESC
Ad-level performance metrics for assets are aggregated in the
ad_group_ad_asset_view. This view collects
metrics for assets per individual ad. Thus, querying this view returns a row per
ad group and ad.
ad_group_ad_asset_view exposes the
gives insight into the performance characteristics of this specific asset-ad
pairing. The possible values of the
performance_label fields are enumerated
in the following table.
|Best performing assets.|
|Good performing assets.|
|Worst performing assets.|
|The asset has started getting impressions but the stats are not statistically significant enough to get an asset performance label.|
|This asset does not yet have any performance information. This may be because it is still under review.|
|Represents value unknown in this version.|
The following GAQL query returns impressions, clicks, costs, and conversions for
all assets in an account during the last month, sorted by their
SELECT ad_group_ad_asset_view.ad_group_ad, ad_group_ad_asset_view.asset, ad_group_ad_asset_view.field_type, ad_group_ad_asset_view.performance_label, metrics.impressions, metrics.clicks, metrics.cost_micros, metrics.conversions FROM ad_group_ad_asset_view WHERE segments.date DURING LAST_MONTH ORDER BY ad_group_ad_asset_view.performance_label