★ Community Edition ★Price: Free



The Scripts Desk

Vallaeys' PMax search-terms-to-Sheet gist: the category box Google keeps shut

A free Google Ads Script gist from Frederick Vallaeys that pulls Performance Max search terms and category labels into a Sheet, prising open a box Google's reporting keeps shut.

The PMax Insights script already on this shelf splits spend and results by channel, but it does not touch a narrower, more stubborn gap: what people actually typed before Performance Max decided to serve an ad. Google's UI groups PMax search terms into broad "search categories" and will not hand over the raw list, which leaves advertisers guessing at what is driving the account behind the category label. Frederick Vallaeys' gist goes after that box directly, pulling PMax search terms and their category labels, alongside conversion metrics, straight into a Google Sheet you control.

Why it made the cut

PMax's search-term category black box is one of the most complained-about visibility gaps of the PMax era, and this gist is a direct, no-nonsense answer to it rather than a general reporting dashboard. The author's standing matters here too: Vallaeys co-founded Optmyzr and spent years as a Google AdWords evangelist, so this is someone who has sat on both sides of the table on exactly this kind of transparency question.

How to use it

  1. Open the gist at the link below and copy the JavaScript.
  2. Create or open a Google Sheet the script can write to, and note its URL.
  3. Paste the script into Tools, Bulk actions, Scripts in Google Ads, add the Sheet URL where the script expects it, and authorise the script.
  4. Preview the first run to check the output, then schedule it to keep the Sheet current.

Worth knowing

The gist is free to copy and paste, hosted openly on GitHub, and was last updated on 10 April 2026 per the GitHub gist listing, so it is being kept in step with Performance Max rather than left to rot. We link to the source rather than reproducing the code here, so you always get the current version.

Source: https://gist.github.com/siliconvallaeys/66b10bfcdc7aab832debb487ffa0a460

  • Performance Max
  • Search terms
  • Reporting