参阅 Performance Max reporting API
指南,详细了解
效果最大化广告系列的报告功能您可以运行任何查询
以及使用
AdsApp.search()
函数。
例如,若要运行素材资源组效果查询,请使用以下代码:
const searchResults = AdsApp.search(`
SELECT
asset_group.id,
asset_group.name,
asset_group.primary_status,
metrics.conversions,
metrics.conversions_value,
metrics.cost_micros,
metrics.clicks,
metrics.impressions
FROM asset_group
WHERE campaign.id = CAMPAIGN_ID
AND segments.date DURING LAST_7_DAYS
`);
while (searchResults.hasNext()) {
const row = searchResults.next();
const assetGroup = row.assetGroup;
// Your custom logic here, fetching the selected fields to do your analysis.
}