Google Ads scripts are the cheapest way to pry open Performance Max. They run inside your account, pull the data the UI won't surface, and drop it somewhere you can actually read it.
What a script can get you
- Search category and query insights, exported and kept, instead of vanishing from the UI.
- Placement data for the Display and YouTube side, so you can see where budget leaks.
- Asset group and asset performance over time, beyond the low, good, best labels.
- Alerts, so you hear about a spend spike or a broken feed the day it happens.
None of this is data Google hides maliciously. It's just not in the interface, and a script pulls it through the API for you.
How a script actually works
A Google Ads script is JavaScript that runs on a schedule inside your account. It queries your data with GAQL, the same query language the API uses, and writes the results to a Google Sheet, an email, or BigQuery.
A minimal version that lists your Performance Max campaigns looks like this:
function main() {
var q =
"SELECT campaign.name, metrics.cost_micros, metrics.conversions " +
"FROM campaign " +
"WHERE campaign.advertising_channel_type = 'PERFORMANCE_MAX' " +
"DURING LAST_30_DAYS";
var rows = AdsApp.report(q).rows();
while (rows.hasNext()) {
var r = rows.next();
Logger.log(r['campaign.name'] + ': ' + r['metrics.conversions']);
}
}
Swap the query for the search category or placement resource and you're pulling the reports PMax buries.
Setting one up
- Open Tools, then Bulk actions, then Scripts, in Google Ads.
- Paste the script, authorize it, and preview to confirm it runs without errors.
- Point the output at a Google Sheet or BigQuery so the data persists.
- Schedule it daily, so you build history the UI never keeps.
Scripts vs the Data Transfer Service
If you just need clean raw exports, the BigQuery Data Transfer Service is simpler and more robust. Reach for scripts when you want logic the transfer can't do: custom alerts, n-gram analysis of search categories, or pulling a specific report on your own terms.
Many teams run both, the transfer for the raw tables and a script or two for the sharp, specific jobs.
Where scripts bite back
- They hit API limits on large accounts, so schedule heavy jobs off-peak.
- They break silently when a field name changes, so log failures and check them.
- They tempt you to automate actions before you trust the data, so read first, act later.
Where to send the output
A script that only logs to the console is a script nobody reads. Send it somewhere the data lives and gets seen:
- A Google Sheet, for a quick shared view your team already checks.
- BigQuery, when you want history and to join it to GA4 or the Data Transfer tables.
- An email or chat alert, for the exceptions you want pushed to you, not pulled.
Match the destination to the job: Sheets for glancing, BigQuery for analysis, alerts for problems.
Start with reading, not acting
Scripts can also change bids, pause campaigns, and edit budgets, and that's exactly where teams get burned. Automating an action on data you haven't learned to trust turns a small reporting gap into a real spend mistake.
Run read-only scripts for a few weeks, confirm the numbers match reality, and only then let a script touch the account. Read first, automate later.
Scripts won't make Performance Max transparent, but they turn a sealed box into one with a few windows cut into it. Pull the search categories, placements, and asset data on a schedule, and you finally get to see what the campaign is doing with your money.
Want a stronger data analyst role or a raise? Grab the FREE Product Analyst Playbook and get the exact roadmap to your next offer.
