★ Community Edition ★Price: Free



The Query Cookbook

GAQL for Performance Max: seeing what the black box will let you see

A pack of read-only queries that pull asset-group performance, the listing-group tree and campaign spend out of Performance Max, with an honest map of where the API stops.

Performance Max is designed to be judged at the top: one campaign, one blended result, trust the machine. GAQL gives you a little more than the interface does, but not as much as an old Search account, and the gap is where most PMax confusion lives. This pack pulls the visibility that genuinely exists, and it is explicit about the visibility that does not.

Everything here reads. Nothing changes an asset group, a listing group or a budget.

Before you start

  • These queries need real PMax campaigns in the account; against a Search-only account they return nothing.
  • metrics.cost_micros is in millionths of the account currency. metrics.conversions_value is in the account currency already.
  • Do not go looking for resources you have read about on other platforms. If a field is not below, assume GAQL cannot see it for PMax, and read the closing section before you conclude the data is missing.

Asset-group performance

The asset group is the closest thing PMax has to an ad group, and it is the most useful unit GAQL will give you. This query lists every asset group with its spend and results over the window, so you can see which creative theme is carrying the campaign and which is dead weight. It is the honest replacement for the ad-group view you no longer have.

GAQL
SELECT
  asset_group.name,
  asset_group.status,
  campaign.name,
  metrics.cost_micros,
  metrics.conversions,
  metrics.conversions_value
FROM asset_group
WHERE segments.date DURING LAST_30_DAYS
ORDER BY metrics.cost_micros DESC

The listing-group tree (structure, not spend)

For a retail PMax campaign, the listing-group filter is how products are partitioned inside an asset group. This query reads that tree: the partitions, their type, and the brand or product value each node splits on. Use it to confirm the structure is what you intended, and to find the catch-all "everything else" node that so often ends up carrying the whole budget.

GAQL
SELECT
  asset_group.name,
  asset_group_listing_group_filter.id,
  asset_group_listing_group_filter.type,
  asset_group_listing_group_filter.case_value.product_brand.value,
  asset_group_listing_group_filter.parent_listing_group_filter
FROM asset_group_listing_group_filter

Be clear about what this is: asset_group_listing_group_filter is a structure resource and carries no metrics, so it tells you how products are grouped, not how each group performed. Do not try to add metrics. fields to it; the query will fail. For performance by product group, use the next query instead.

Listing-group performance

When you do want spend and conversions by product group, the resource that carries metrics is asset_group_product_group_view, not the filter above. This query attaches performance to each listing-group node, so you can see which partition of the catalogue is actually earning. It is the metric layer that sits on top of the structure the previous query describes.

GAQL
SELECT
  asset_group.name,
  asset_group_product_group_view.asset_group_listing_group_filter,
  metrics.cost_micros,
  metrics.conversions,
  metrics.conversions_value
FROM asset_group_product_group_view
WHERE segments.date DURING LAST_30_DAYS
ORDER BY metrics.cost_micros DESC

Campaign-level PMax spend context

Sometimes the honest question is simply "what are the PMax campaigns doing overall", separate from the Search and Shopping campaigns beside them. This query filters the campaign report to Performance Max only, giving you the top-line spend, conversions and value per campaign as context for everything above.

GAQL
SELECT
  campaign.name,
  campaign.status,
  metrics.cost_micros,
  metrics.conversions,
  metrics.conversions_value
FROM campaign
WHERE campaign.advertising_channel_type = 'PERFORMANCE_MAX'
  AND segments.date DURING LAST_30_DAYS
ORDER BY metrics.cost_micros DESC

How to run these

Any GAQL runner works. The usual three:

  1. The Google Ads API: pass each query to GoogleAdsService.SearchStream against your customer id.
  2. The official interactive Query Builder in the Google Ads API docs: paste a query to validate the PMax resources and preview the response shape.
  3. A Google Ads Script: hand the query to AdsApp.search(query) and iterate the rows, no API credentials needed.

What GAQL cannot see inside Performance Max

This is the part worth reading twice. GAQL does not expose a channel split for PMax: there is no query that tells you how much of a campaign's spend went to Search versus Shopping versus Display versus YouTube. That breakdown simply is not in the API, which is why the community leans on scripts that infer it (there is one such pick elsewhere in the Vault). Individual search terms are not available for PMax through search_term_view either; the nearest thing is campaign_search_term_insight, which reports grouped search categories rather than raw terms, and only with its own filtering rules. Placement-level detail is likewise absent. So treat this pack as the real, usable edge of PMax visibility, not a full account view, and do not invent a resource to fill a gap the API has deliberately left open.

  • GAQL
  • Performance Max
  • Reporting