Performance Max is powerful, but it is deliberately opaque. Google decides how your budget is split across Search, Shopping, Display, YouTube, Gmail and Discover, and the standard interface tells you very little about where the money actually went or which search terms triggered your ads. For anyone trying to manage spend responsibly, that black box is a real problem.
Google Ads scripts are the most practical way to open it up. This guide covers the scripts we rate most highly for PMax, what each one actually does, how to install one, and how we use their output for clients.
What Google Ads scripts are and why PMax needs them
A Google Ads script is a piece of JavaScript that runs inside your account and uses the Google Ads API to pull data or make changes on a schedule. Google provides the scripting environment for free; most of the scripts below are also free to copy and paste, with a couple of premium options noted where relevant.
PMax needs them because so much of its reporting is hidden. You cannot see a full search terms report the way you can in a standard Search campaign, channel-level spend is not surfaced by default, and placement data is buried. Scripts extract that data into a Google Sheet or an email alert so you can see what is happening and act on it. They give you back the visibility and a degree of the control that PMax otherwise takes away.
The scripts we rate
1. Performance Max Spend Allocation / Insights Script by Mike Rhodes
One of the primary challenges with PMax campaigns is understanding where your budget is being allocated across Google’s vast network. Mike Rhodes’ script addresses this by breaking down your ad spend across channels, including Search, Shopping, Display and YouTube. This clarity allows you to identify which channels are delivering the best ROI and adjust your strategy accordingly.
The script has evolved well beyond a simple spend split. Current versions also surface search category performance and asset group data per channel, which is why many practitioners treat it as their single most-used PMax script. Mike offers free versions of his scripts through his community, alongside a more advanced paid “insights” version that adds deeper channel and product-level analysis. Both single-account and MCC (manager account) versions are available.
What the output looks like: a Google Sheet with a row per channel showing spend, conversions and value, plus tabs for search categories and asset groups. It is a read-only reporting script, so it never changes your account.
Key Features:
- Detailed breakdown of spend across channels
- Identification of underperforming areas
- Insights into budget distribution and asset group performance
Access the script: Mike Rhodes’ PMax scripts (via his community)
2. Non-Converting Search Term Alerts by Nils Rooijmans
PMax campaigns can sometimes target broad or irrelevant search queries, leading to wasted ad spend. Nils Rooijmans’ script identifies search terms that generate clicks without conversions, compiling them into a report. This enables you to add these terms as negative keywords, refining your targeting and improving ROI.
A useful bit of context here: since late 2024, Google has let advertisers add negative keywords directly to Performance Max campaigns without needing to contact Google, and campaign-level negative keyword limits have since expanded significantly. That makes this script far more actionable than it once was, because you can act on its findings the same day.
Key Features:
- Weekly email alerts with non-converting search terms
- Google Sheets integration for easy analysis
- Customisable thresholds for clicks and conversions
What the output looks like: a Google Sheet listing search terms that passed a click threshold with zero (or near-zero) conversions, plus a weekly email alert when new ones appear.
Access the script: Non-Converting Search Term Alerts
3. PMax Trending Search Categories Script by Nils Rooijmans
Staying ahead of market trends is crucial for campaign success. This script analyses your PMax campaigns to identify trending search categories, highlighting topics that are increasing or decreasing in popularity. With this information, you can adjust your bids and creatives to align with current market trends.
Key Features:
- Weekly reports on rising and declining search categories
- Insights into changing user behaviour
- Opportunities to optimise ad creatives and landing pages
Access the script: PMax Trending Search Categories Script
4. PMax Placement Exclusion Suggestions by Nils Rooijmans
Not all placements are created equal; some may not contribute to your campaign goals. This script scans your PMax placement data to identify underperforming websites and apps. By excluding these low-performing placements, you can reduce wasted ad spend and focus your budget on high-performing channels.
Key Features:
- Identification of low-performing placements
- Recommendations for exclusions
- Improved budget allocation
Access the script: PMax Placement Exclusion Suggestions
5. All-In-One PMax Insights Script by Mike Rhodes
Managing PMax campaigns often requires juggling multiple reports across placements, search terms, assets and budget trends. Mike Rhodes’ more advanced insights script consolidates this data into a single dashboard, simplifying monitoring and optimisation. Because it aggregates everything in one sheet, you can quickly spot trends, detect inefficiencies and take swift action to improve results. This is the paid tier of Mike’s scripts; access is via a one-time payment through his community that includes future updates.
Key Features:
- Comprehensive dashboard pulling multiple report types together
- Insights into placements, search terms and asset performance
- Streamlined workflow for efficient campaign management
Access the script: All-In-One PMax Insights Script
6. N-Gram / Search Query Mining Script (updated by Nils Rooijmans)
The classic Brainlabs n-gram script, originally written by Daniel Gilbert and kept up to date by Nils Rooijmans for the current scripts environment, is a search-term workhorse that pairs well with PMax and Search alike. An n-gram is simply a phrase made of n words: a 1-gram is one word, a 2-gram is two words, and so on. The script groups your search query data by n-gram and adds up the clicks, impressions, cost, conversions and conversion value for each, then calculates CTR, CPC, conversion rate, CPA and value/cost.
The point is that patterns invisible at the individual-query level jump out when you aggregate. If a two-word phrase is consistently spending without converting, you have a strong candidate for a negative keyword; if a phrase converts well, it is a candidate for its own ad group or search theme. It is free to copy and paste, and it now uses GAQL after being updated in 2025 to work in the new scripts environment.
What the output looks like: a Google Sheet with a tab per n-gram length, each row a phrase with its aggregated metrics.
Access the script: Brainlabs Search Query Mining for N-Gram Analysis (updated)
7. Asset group and asset performance reporting
PMax hides which of your headlines, descriptions, images and videos are actually pulling their weight. Rather than a separate third-party script here, the most reliable route is the asset-group and asset-performance reporting built into Mike Rhodes’ insights script (entries 1 and 5 above), which breaks performance down by asset group and by channel. That lets you see which creative themes are working and where you should refresh assets, so you are improving the inputs PMax has to work with rather than just watching the outputs.
How to install a Google Ads script (step by step)
Installing any of these takes a few minutes and no coding beyond pasting the provided code:
- In Google Ads, click the Tools icon, then Bulk actions, then Scripts.
- Click the blue + button to create a new script and give it a name.
- Paste the script’s JavaScript into the editor. Most scripts have a short configuration section at the top (for example, your email address, a Google Sheet URL or a click threshold) — set those first.
- Click Preview to run a read-only simulation and check for errors.
- Click Authorise (then Grant access) to give the script permission to read or change your account via your Google login. You only do this once per script.
- Click Run to execute it now, or set a schedule — hourly, daily, weekly or monthly at a chosen hour — using the frequency option below the editor. Reporting scripts are typically fine run weekly; alert scripts often run daily.
For manager accounts, several of these scripts have an MCC version that loops across all accounts from one place, which is how we run them at scale.
Are scripts safe? Will they break my account?
For the most part, yes, they are safe, with a couple of sensible caveats. The scripts in this list are overwhelmingly read-only: they pull data into a sheet or send an alert and make no changes to your campaigns. A read-only reporting script cannot break your account. Only write scripts (ones that add negatives, adjust bids or pause things) actually change anything, and even those preview their intended changes before you authorise them.
Two practical points. First, only ever paste scripts from authors you trust — the ones above are well-known PPC practitioners with public track records. Second, Google Ads scripts run against API quotas and have execution-time limits, so very large accounts may need the MCC version or a script that batches its work. None of this puts your account at risk; it just shapes how you schedule things.
Comparison table
| Script | Author | What it does | Free/Paid | Best for | Frequency to run |
|---|---|---|---|---|---|
| Spend Allocation / Insights | Mike Rhodes | Splits spend and performance by channel, search category and asset group | Free version available; advanced version paid | Seeing where PMax spends your budget | Weekly |
| Non-Converting Search Term Alerts | Nils Rooijmans | Flags search terms with clicks but no conversions | Free | Cutting wasted spend via negatives | Weekly |
| Trending Search Categories | Nils Rooijmans | Tracks rising and falling search categories week on week | Free | Spotting demand shifts early | Weekly |
| Placement Exclusion Suggestions | Nils Rooijmans | Surfaces low-value placements to exclude | Free | Trimming junk display/app placements | Weekly or monthly |
| All-In-One PMax Insights | Mike Rhodes | Consolidated dashboard across placements, terms, assets and budget | Paid | A single monitoring hub | Weekly |
| N-Gram / Search Query Mining | Brainlabs / Nils Rooijmans | Aggregates search terms by phrase to expose patterns | Free | Finding negatives and new themes at scale | Monthly |
How we use these at HOC
Across the accounts we manage, the spend-allocation and non-converting search term scripts do the most work day to day: the first tells us whether PMax is quietly pushing budget into Display or YouTube when we want it on Search and Shopping, and the second feeds a steady list of negative keywords. On more than one account, the channel breakdown has prompted us to restructure asset groups or feed exclusions so that spend concentrates where it converts, rather than accepting Google’s default split. The scripts do not replace judgement — they just make sure the judgement is informed.
Frequently asked questions
Do I need to be a developer to use these? No. You paste the code, set a few options at the top, authorise it once and schedule it. No coding knowledge is required.
Are Google Ads scripts free? The scripting environment is free, and most of the scripts here are free to copy and paste. A couple of advanced options, such as Mike Rhodes’ full insights script, are paid.
Will a script change my campaigns without asking? Not the reporting scripts in this list — they are read-only. Any script that makes changes shows you a preview and requires you to authorise it before it can act.
Can I add negative keywords to Performance Max now? Yes. Google rolled this out to all advertisers from late 2024, and campaign-level negative keyword capacity has since increased, so the output of the search-term scripts is directly actionable.
How often should I run them? Reporting scripts are usually fine weekly; alert scripts often run daily. The table above gives a sensible starting cadence for each.
Implementing these scripts can significantly enhance the performance and transparency of your PMax campaigns. By automating data analysis and surfacing what PMax hides, you free yourself up for the strategic decisions that actually move results.
More insights.
A Simple System to Beat Meta Ad Fatigue
Creative fatigue killing your Meta ROAS? A simple, repeatable system to refresh ads before performance drops — with the exact signals to watch.
How We’re Scaling Meta Ads Profitably in 2025: A Framework That Actually Works
Most brands I speak with are spending serious money on Meta ads. Founders, heads of growth, marketing leads – they’re all trying to crack the same code. But nine times out of ten, their ad…
Bing Ads Remarketing: The Retargeting You're Missing
Microsoft (Bing) Ads dynamic remarketing is underused and cheap — how to set it up, who to retarget, and why it can outperform for B2B.
Want this kind of analysis on your account?
We'll review your campaigns and send you a written summary of the top wasted-spend opportunities. Three working days, no call required.