報表

請參閱 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.
  }