PMax Channel Spend Breakdown: Scripts, BigQuery & GAQL Guide
Learn how to extract PMax channel spend breakdown across Shopping, Video, Search, and Display using Google Ads Scripts, BigQuery exports, and GAQL queries.
By AdTurbo Team · 2026-08-31
Performance Max (PMax) campaigns are designed to unify Google's entire ad inventory—Search, Shopping, Display, YouTube, Gmail, Discover, and Maps—into a single automated black box. While machine learning handles automated bid adjustments and creative assembly across placements, advertisers are left with a critical visibility problem: Google's native interface bundles total campaign spend without showing a clear dollar-for-dollar breakdown by placement channel.
If your PMax campaign spends $10,000 in a month, how much went to high-intent Shopping clicks versus low-intent Display network placements or YouTube short impressions?
In this technical guide, you will learn how to extract PMax channel spend breakdown data using three repeatable methods: custom Google Ads Scripts, BigQuery SQL data pipelines via Google Ads Data Transfer, and Google Ads Query Language (GAQL) queries. We will also examine how to interpret the mathematical "residual spend" to isolate Display, Video, and Search delivery.
---
The PMax Black Box: Why Channel-Level Breakdown Matters
When Performance Max launched, it replaced Smart Shopping and Local campaigns while absorbing substantial Search and Display impression share. Google's core value proposition was algorithmic efficiency: cross-channel attribution powered by Smart Bidding.
However, automated multi-channel allocation introduces severe diagnostic blind spots for performance marketers.
The Hidden Spend Dilemma
Unlike traditional Google Ads campaign types where each channel operates in dedicated silos with individual budget controls, Performance Max pools your budget. Without channel-level reporting, several negative scenarios occur undetected:
1. Display Network Waste: PMax may allocate 30% to 50% of your daily budget toward low-converting mobile app placements, click farms, or unintended Display network banner inventory.
2. Video Inventory Bloat: If you upload video assets (or allow Google to auto-generate them), PMax may allocate significant budget to YouTube Shorts or in-stream ads that drive high view counts but zero post-click purchase intent.
3. Brand Search Cannibalization: PMax frequently captures high-converting brand traffic, masking poor non-brand Shopping and Display performance behind inflated overall campaign ROAS.
To diagnose performance degradation or validate scaling decisions, you must extract exact cost, impression, and conversion figures segregated by inventory type.
What the Native Google Ads UI Shows vs. What It Hides
Google has gradually rolled out incremental reporting features—such as Asset Group performance indicators, placement reports (showing impressions only, without spend or conversions), and high-level Search Term categories. You can review our detailed walkthrough on the Search Terms report guide to understand standard Search visibility limits.
Despite these updates, the standard Google Ads UI still does not provide a simple column for: Spend: Shopping, Spend: Search, Spend: Display, and Spend: Video.
To see exact cost figures by channel, you must query Google's underlying database tables where product listing costs, text asset costs, and total campaign metrics are stored separately.
---
Understanding Channels Inside Performance Max
Before running scripts or writing SQL, you must understand how Google's database schema categorizes Performance Max data.
+-------------------------------------------------------------+
| PERFORMANCE MAX CAMPAIGN |
+-------------------------------------------------------------+
|
+-----------------------+-----------------------+
| |
v v
+---------------------------+ +---------------------------+
| SHOPPING INVENTORY | | ASSET GROUP INVENTORY |
| (Google Merchant Center) | | (Text, Images, Videos) |
+---------------------------+ +---------------------------+
| |
v +--- Search Network
Shopping Placements +--- Display Network
(Search Page Shopping Grid, +--- YouTube / Video
Shopping Tab) +--- Discover / Gmail
How PMax Allocates Budget Across Networks
PMax evaluates real-time auction signals to shift spend dynamically across five main buckets:
• Shopping Ads: Product listing ads driven by your Google Merchant Center product feed.
• Search Ads (Text): Dynamic Search and text ads generated from your headlines, descriptions, and URL expansion settings.
• Display Network: Responsive Display Ads served across the Google Display Network (GDN), mobile apps, and AdSense publisher websites.
• YouTube / Video: In-stream, bumper, and YouTube Shorts video ads served via uploaded YouTube video links or auto-rendered video assets.
• Discover & Gmail: Native visual ads appearing in Google Discover feeds, YouTube home feeds, and Gmail promotion tabs.
The Mathematical Splitting Logic
Google Ads does not expose a single field called channelname. Instead, developers isolate channel costs using mathematical subtraction across multiple API endpoints:
$\text{Total Campaign Spend} - \text{Shopping (Listing Group) Spend} = \text{Asset Group Network Spend}$
From the remaining Asset Group spend, you can query Search and Video specific endpoints to isolate remaining Display/Discover impressions and spend:
$\text{Asset Group Spend} - \text{Search Asset Spend} - \text{Video Asset Spend} = \text{Display, Discover \& Gmail Residual Spend}$
Let us look at how to automate this calculation using Google Ads Scripts.
---
Method 1: Using a Google Ads Script for Channel Breakdown
A Google Ads Script runs JavaScript directly inside your Google Ads account, queries the reporting API, processes the math, and logs the output directly to a Google Sheet.
How the PMax Spend by Channel Script Operates
The script queries two core views in Google Ads:
1. shoppingperformanceview: Captures all metrics (Cost, Impressions, Clicks, Conversions, Conversion Value) driven directly by Merchant Center Product IDs.
2. campaign: Captures aggregate campaign-level metrics.
By comparing the aggregate metrics against the shopping performance metrics for any specified date range, the script calculates the non-shopping spend (Search, Display, Video, and Discover).
Complete Copy-Paste Google Ads Script
Follow these steps to deploy the script:
1. In your Google Ads account, navigate to Tools and Settings Bulk Actions Scripts.
2. Click the blue + button to create a new script.
3. Paste the following JavaScript code into the editor:
javascript
/
• Performance Max Channel Spend Breakdown Script
• AdTurbo Technical Guide
/
function main() {
// 1. Define Date Range (e.g., 'LAST30DAYS', 'THISMONTH', 'LASTMONTH')
const DATERANGE = 'LAST30DAYS';
// 2. Query Campaign-Level Aggregates for PMax
const campaignQuery =
SELECT
campaign.id,
campaign.name,
metrics.costmicros,
metrics.impressions,
metrics.clicks,
metrics.conversions,
metrics.conversionsvalue
FROM campaign
WHERE campaign.advertisingchanneltype = 'PERFORMANCEMAX'
AND metrics.costmicros 0
AND segments.date DURING ${DATERANGE}
;
const campaignData = {};
const campaignReport = AdsApp.search(campaignQuery);
while (campaignReport.hasNext()) {
let row = campaignReport.next();
let cId = row.campaign.id;
campaignData[cId] = {
name: row.campaign.name,
totalCost: row.metrics.costMicros / 1000000,
totalImpressions: row.metrics.impressions,
totalClicks: row.metrics.clicks,
totalConversions: row.metrics.conversions,
totalConversionValue: row.metrics.conversionsValue,
shoppingCost: 0,
shoppingImpressions: 0,
shoppingClicks: 0,
shoppingConversions: 0,
shoppingConversionValue: 0
};
}
// 3. Query Shopping-Specific Performance for PMax
const shoppingQuery =
SELECT
campaign.id,
metrics.costmicros,
metrics.impressions,
metrics.clicks,
metrics.conversions,
metrics.conversionsvalue
FROM shoppingperformanceview
WHERE campaign.advertisingchanneltype = 'PERFORMANCEMAX'
AND metrics.costmicros 0
AND segments.date DURING ${DATERANGE}
;
const shoppingReport = AdsApp.search(shoppingQuery);
while (shoppingReport.hasNext()) {
let row = shoppingReport.next();
let cId = row.campaign.id;
if (campaignData[cId]) {
campaignData[cId].shoppingCost += (row.metrics.costMicros / 1000000);
campaignData[cId].shoppingImpressions += row.metrics.impressions;
campaignData[cId].shoppingClicks += row.metrics.clicks;
campaignData[cId].shoppingConversions += row.metrics.conversions;
campaignData[cId].shoppingConversionValue += row.metrics.conversionsValue;
}
}
// 4. Output Breakdown
Logger.log('--- PERFORMANCE MAX CHANNEL SPEND BREAKDOWN (' + DATERANGE + ') ---');
for (let cId in campaignData) {
let c = campaignData[cId];
let otherCost = c.totalCost - c.shoppingCost;
let shoppingCostPct = ((c.shoppingCost / c.totalCost) 100).toFixed(2);
let otherCostPct = ((otherCost / c.totalCost) 100).toFixed(2);
let shoppingRoas = c.shoppingCost 0 ? (c.shoppingConversionValue / c.shoppingCost).toFixed(2) : '0.00';
let otherConvVal = c.totalConversionValue - c.shoppingConversionValue;
let otherRoas = otherCost 0 ? (otherConvVal / otherCost).toFixed(2) : '0.00';
Logger.log('Campaign: ' + c.name);
Logger.log(' Total Spend: