AI-generated Key Takeaways
-
Assets and their attributes can be retrieved using a Google Ads Query Language (GAQL) query on the
assetentity. -
Type-specific attributes for assets like images or YouTube videos can be added to the query to access their unique properties.
-
Asset metrics can be queried at the ad group, campaign, or customer level using resources such as
ad_group_asset,campaign_asset, andcustomer_asset. -
Ad-level performance metrics for assets, particularly for App ads, are available through the
ad_group_ad_asset_view, which also includes aperformance_labelto indicate asset performance. -
The source of mutable assets can be found in
Asset.source, while the source of RSA Assets is inAdGroupAdAsset.source.
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.
Asset attributes
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
You can add type-specific attributes this query to read properties specific to
assets such as ImageAsset or
YoutubeVideoAsset.
For example, the following query lists the YouTube video IDs for all
YoutubeVideoAsset objects in an account by
filtering the asset.type value. See a list of
possible type values) for YoutubeVideoAsset.
SELECT
asset.id,
asset.name,
asset.resource_name,
asset.youtube_video_asset.youtube_video_id
FROM asset
WHERE asset.type = 'YOUTUBE_VIDEO'
Asset metrics
Asset metrics are made available through a few resources:
With these resources, you can query asset metrics at each respective level.
For example, when you query the ad_group_asset resource, you can use the
ad_group.id field to segment the results, thereby retrieving metrics for each
unique combination of ad_group and asset:
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 metrics
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 one row
per ad group and ad.
The ad_group_ad_asset_view exposes the
view-specific attribute
performance_label that
gives insight into the performance characteristics of this specific asset-ad
pairing. The following table enumerates the possible values of the
performance_label fields.
performance_label | Description |
|---|---|
BEST | Best performing assets. |
GOOD | Good performing assets. |
LOW | Worst performing assets. |
LEARNING | The asset has started getting impressions but the stats are not statistically significant enough to get an asset performance label. |
PENDING | This asset doesn't yet have any performance information. This may be because it is still under review. |
UNKNOWN | Represents value unknown in this version. |
UNSPECIFIED | Not specified. |
The following GAQL query returns impressions, clicks, costs, and conversions for
all assets in an account during the last month, sorted by their
performance_label:
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
Asset Source
Asset.source is only accurate for
mutable
Assets.
For the source of RSA Assets use,
AdGroupAdAsset.source.