报告
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
您可以向 GoogleAdsService 发送 Google Ads 查询语言 (GAQL) 查询,以获取素材资源及其属性的列表。素材资源由 asset
实体表示,该实体会公开许多特定于素材资源的字段。
资源属性
以下 GAQL 查询会列出广告客户账号中的所有素材资源,以及它们的资源名称和类型。
SELECT
asset.id,
asset.name,
asset.resource_name,
asset.type
FROM asset
您可以向此查询添加特定于类型的属性,以读取特定于素材资源的属性,例如 ImageAsset
或 YoutubeVideoAsset
。
例如,以下查询通过过滤 asset.type
值,列出账号中所有 YoutubeVideoAsset
对象的 YouTube 视频 ID。如需查看 YoutubeVideoAsset
的可能类型值列表,请参阅。
SELECT
asset.id,
asset.name,
asset.resource_name,
asset.youtube_video_asset.youtube_video_id
FROM asset
WHERE asset.type = 'YOUTUBE_VIDEO'
素材资源指标
您可以通过以下几种资源获取素材资源指标:
借助这些资源,您可以查询每个相应级别的广告素材指标。例如,当您查询 ad_group_asset
资源时,可以使用 ad_group.id
字段来细分结果,从而检索 ad_group
和 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_group_ad_asset_view
中。此视图会收集每个广告的素材资源指标。因此,查询此视图会针对每个广告组和广告返回一行。
ad_group_ad_asset_view
公开了视图专用属性 performance_label
,可用于深入了解此特定素材资源-广告配对的效果特征。下表列出了 performance_label
字段的可能值。
performance_label | 说明 |
BEST | 效果出色的素材资源。 |
GOOD | 效果出色的素材资源。 |
LOW | 效果最差的素材资源。 |
LEARNING | 素材资源已开始获得展示,但统计信息在统计学上不够显著,无法获得素材资源效果标签。 |
PENDING | 此素材资源尚无任何效果信息。这可能是因为该应用仍在审核中。
|
UNKNOWN | 表示此版本中的未知值。
|
UNSPECIFIED | 未指定。 |
以下 GAQL 查询会返回账号中所有素材资源在上个月的展示次数、点击次数、费用和转化次数,并按其 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
仅适用于 mutable
素材资源。
对于 RSA 素材资源的来源,请使用 AdGroupAdAsset.source
。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-27。
[null,null,["最后更新时间 (UTC):2025-08-27。"],[[["\u003cp\u003eRetrieve a list of assets and their attributes, including type-specific properties, using GAQL queries to the GoogleAdsService.\u003c/p\u003e\n"],["\u003cp\u003eAccess asset metrics at the ad group, campaign, and customer levels through their respective resources to analyze performance.\u003c/p\u003e\n"],["\u003cp\u003eUtilize the \u003ccode\u003ead_group_ad_asset_view\u003c/code\u003e to gain insights into ad-level performance metrics specifically for App ads assets, including a performance label.\u003c/p\u003e\n"],["\u003cp\u003eDetermine the source of mutable assets with \u003ccode\u003eAsset.source\u003c/code\u003e and the source of RSA assets with \u003ccode\u003eAdGroupAdAsset.source\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Reports\n\nYou can get a list of assets and their attributes by sending a [Google Ads Query\nLanguage (GAQL) query](/google-ads/api/docs/query/overview) to the GoogleAdsService. Assets\nare represented by the [`asset`](/google-ads/api/fields/v21/asset) entity, which exposes a number\nof asset-specific fields.\n\nAsset attributes\n----------------\n\nThe following GAQL query lists all assets in an advertiser's account along with\ntheir resource name and type. \n\n SELECT\n asset.id,\n asset.name,\n asset.resource_name,\n asset.type\n FROM asset\n\nYou can add type-specific attributes this query to read properties specific to\nassets such as [`ImageAsset`](/google-ads/api/reference/rpc/v21/ImageAsset) or\n[`YoutubeVideoAsset`](/google-ads/api/reference/rpc/v21/YoutubeVideoAsset).\n\nFor example, the following query lists the YouTube video IDs for all\n[`YoutubeVideoAsset`](/google-ads/api/reference/rpc/v21/YoutubeVideoAsset) objects in an account by\nfiltering the [`asset.type`](/google-ads/api/fields/v21/asset#asset.type) value. See a list of\npossible type values) for [`YoutubeVideoAsset`](/google-ads/api/reference/rpc/v21/YoutubeVideoAsset). \n\n SELECT\n asset.id,\n asset.name,\n asset.resource_name,\n asset.youtube_video_asset.youtube_video_id\n FROM asset\n WHERE asset.type = 'YOUTUBE_VIDEO'\n\nAsset metrics\n-------------\n\nAsset metrics are made available through a few resources:\n\n- [`ad_group_asset`](/google-ads/api/fields/v21/ad_group_asset)\n- [`campaign_asset`](/google-ads/api/fields/v21/campaign_asset)\n- [`customer_asset`](/google-ads/api/fields/v21/customer_asset)\n\nWith these resources, you can query asset metrics at each respective level.\nFor example, when you query the `ad_group_asset` resource, you can use the\n`ad_group.id` field to segment the results, thereby retrieving metrics for each\nunique combination of `ad_group` and `asset`: \n\n SELECT\n ad_group.id,\n asset.id,\n metrics.clicks,\n metrics.impressions\n FROM ad_group_asset\n WHERE segments.date DURING LAST_MONTH\n ORDER BY metrics.impressions DESC\n\nAd-level metrics\n----------------\n\n| **Key Point:** The [`ad_group_ad_asset_view`](/google-ads/api/fields/v21/ad_group_ad_asset_view) only returns information for assets that are related to App ads.\n\nAd-level performance metrics for assets are aggregated in the\n[`ad_group_ad_asset_view`](/google-ads/api/fields/v21/ad_group_ad_asset_view). This view collects\nmetrics for assets per individual ad. Thus, querying this view returns one row\nper ad group and ad.\n\nThe [`ad_group_ad_asset_view`](/google-ads/api/fields/v21/ad_group_ad_asset_view) exposes the\nview-specific attribute\n[`performance_label`](/google-ads/api/reference/rpc/v21/AdGroupAdAssetView#performance_label) that\ngives insight into the performance characteristics of this specific asset-ad\npairing. The following table enumerates the possible values of the\n`performance_label` fields.\n\n| `performance_label` | Description |\n|---------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| `BEST` | Best performing assets. |\n| `GOOD` | Good performing assets. |\n| `LOW` | Worst performing assets. |\n| `LEARNING` | The asset has started getting impressions but the stats are not statistically significant enough to get an asset performance label. |\n| `PENDING` | This asset doesn't yet have any performance information. This may be because it is still under review. |\n| `UNKNOWN` | Represents value unknown in this version. |\n| `UNSPECIFIED` | Not specified. |\n\nThe following GAQL query returns impressions, clicks, costs, and conversions for\nall assets in an account during the last month, sorted by their\n`performance_label`: \n\n SELECT\n ad_group_ad_asset_view.ad_group_ad,\n ad_group_ad_asset_view.asset,\n ad_group_ad_asset_view.field_type,\n ad_group_ad_asset_view.performance_label,\n metrics.impressions,\n metrics.clicks,\n metrics.cost_micros,\n metrics.conversions\n FROM ad_group_ad_asset_view\n WHERE segments.date DURING LAST_MONTH\n ORDER BY ad_group_ad_asset_view.performance_label\n\nAsset Source\n------------\n\n[`Asset.source`](/google-ads/api/reference/rpc/v21/AssetSourceEnum.AssetSource) is only accurate for\n[`mutable`](/google-ads/api/docs/assets/overview#asset_types_linked_to_customers_campaigns_and_ad_groups)\nAssets.\n\nFor the source of RSA Assets use,\n[`AdGroupAdAsset.source`](/google-ads/api/fields/v21/ad_group_ad_asset_view#ad_group_ad_asset_view.source)."]]