Free library · Updated May 2026

Google Ads scripts: complete guide and library

Everything you need to understand, find, and run Google Ads scripts. Curated from the best sources in the industry, with opinionated picks for what actually moves the needle in 2026.

20scripts curated
6categories
8top sources
100%free scripts included
Dan KabakovCurated by Dan Kabakov, Google Partner and Google Ads specialist
Tools › Bulk actions › Scripts
budget-pacing.jsFrequency: Daily
// Budget pacing alert. Runs daily.
// Edit only these values:
var EMAIL = '[email protected]';
var MONTHLY_BUDGET = 15000;
var ALERT_THRESHOLD = 0.15; // 15% off pace
var SHEET_URL = 'https://docs.google.com/…';
function main() {
var spend = AdsApp.currentAccount()
.getStatsFor('THIS_MONTH').getCost();
checkPace(spend, MONTHLY_BUDGET);
}
Edit only these values
AuthorizePreviewRunPreview finished. 0 changes made.
The basics

What are Google Ads scripts?

Google Ads Scripts are JavaScript programs that run inside the Google Ads interface and interact directly with your account data. They execute automatically on a schedule (hourly, daily, or weekly), making changes, pulling reports, or sending alerts without any manual work. No API key, no third-party software, no coding environment required. You paste the script into Google Ads, configure a few variables, and set a run schedule.

Scripts have been part of Google Ads since 2012. In that time, a large community of PPC practitioners has built thousands of free, production-tested scripts covering almost every aspect of account management. The ones in this library come from that community.

They work at two levels

Single-account scripts

run inside one account and are useful for reporting, alerts, and optimization.

MCC-level scripts

run across all accounts in a manager account and are the foundation of how agencies operate at scale.

What scripts can do

  • Send email alerts
  • Update bids
  • Pause keywords
  • Build spreadsheet reports
  • Check URLs
  • Pull search terms data
  • Monitor budgets
  • Audit account structure

What scripts cannot do

  • Create campaigns from scratch via full automation
  • Access competitor data
  • Read Smart Bidding signals
  • Replace strategic judgment on account structure
Context

Why scripts still matter in 2026

The fair question is whether scripts are still relevant when AI assistants can generate code on demand. The answer is yes, for a specific reason: scripts run against your live account data. An AI tool can write a budget pacing script in 30 seconds, but it cannot check whether your account is actually on pace this morning. Only a script that runs inside Google Ads can do that.

The shift AI has made is in the barrier to entry. You no longer need to understand JavaScript to adapt a script to your account. You paste it into Claude or ChatGPT, describe your threshold values, and get a modified version in seconds. The community-built scripts in this library are the raw material. AI is the tool that makes them accessible to everyone.

Performance Max is the other driver. Google increasingly routes budget through PMax with very little transparency. Scripts are currently the primary way to get asset group-level performance data, search category breakdowns, and placement reports out of PMax. Without them, you are largely flying blind.

AI assistant

  • Writes a budget pacing script in 30 seconds
  • Adapts any script to your thresholds
  • Can't check if you're on pace this morning

Script inside Google Ads

  • Runs against your live account data
  • Runs on a schedule: hourly, daily or weekly
  • Sends alerts, pulls reports, makes changes
Practical note

The highest-value scripts in 2026 are the ones that give you visibility inside Performance Max campaigns and catch operational issues (broken URLs, site downtime, feed errors) before they cost you money. Both categories are well-represented in the library below.

The library

20 curated Google Ads scripts

Showing all 20 scripts
BeginnerIntermediateAdvanced
Reporting

Account Performance Summary

By Mike Rhodes

Emails you a daily digest of your account's key metrics: clicks, impressions, cost, conversions, and ROAS. No spreadsheet setup required. The simplest way to stay informed on accounts you're not checking daily.

BeginnerView script
ReportingDan's pick

Quality Score Historical Tracker

By Martin Roettgerding

Logs quality scores for every keyword into a Google Sheet daily. Google does not store historical QS data, so without a script like this you have no idea whether your QS is improving or declining. One of the most widely used scripts ever written in the Google Ads community.

BeginnerView script
Reporting

Auction Insights Reporter

By Brainlabs

Automatically pulls auction insights data (impression share, overlap rate, outranking share) into a spreadsheet so you can track competitor trends over time. Especially useful for competitive markets where a new entrant or price change explains sudden performance shifts.

IntermediateView script
ReportingDan's pick

N-gram Search Term Analysis

By Brainlabs + Nils Rooijmans

Breaks down your search terms into 1-word, 2-word, and 3-word patterns and analyzes them by spend, clicks, and conversions. The fastest way to surface negative keyword candidates and identify winning query patterns to add as keywords. One of the most universally useful scripts in the entire library.

IntermediateView script
BudgetDan's pick

Budget Pacing Alert

By Mike Rhodes

Sends an email alert when your account is on track to significantly over- or under-spend its monthly budget. Configurable threshold. The most basic script for any account you're not monitoring daily. Prevents the end-of-month budget overshoot that no one catches until the invoice arrives.

BeginnerView script
Budget

Monthly Budget Monitor

By ads-scripts.com

Checks each campaign daily against a monthly budget target set in a Google Sheet and alerts when spend is trending off-pace. Works with shared budgets. Useful when different campaigns have different monthly caps that need individual tracking rather than a single account-level budget.

BeginnerView script
Budget

Performance Anomaly Detector

By Brainlabs

Flags when any key metric deviates significantly from expected performance based on historical patterns. Uses statistical thresholds rather than fixed rules, so it adapts to seasonal patterns in your account. Best suited to larger accounts where manual daily review isn't practical.

AdvancedView script
Shopping & PMaxDan's pickMost used

PMax Insights Script

By Mike Rhodes

The most widely used Performance Max script. Pulls search categories, asset group performance, and placement data out of the PMax black box into a clean Google Sheet. Free v28 available on GitHub. The paid version ($199 one-time) adds additional breakdowns. Used by Dentsu, Merkle, Publicis, and thousands of independent practitioners.

BeginnerView script
Shopping & PMax

PMax Asset Group Performance Report

By ads-scripts.com

Creates a Google Spreadsheet with KPI breakdowns by asset group, including cost, conversions, ROAS, and asset strength indicators. Useful when you have multiple asset groups targeting different product ranges and need to compare them quickly without waiting for the UI to load.

BeginnerView script
Shopping & PMaxDan's pick

Merchant Center Monitor

By ads-scripts.com

Monitors your Google Merchant Center feed and sends an alert when products get disapproved or when the number of feed errors crosses a configurable threshold. For ecommerce accounts, feed health is directly tied to Shopping revenue. This script catches problems before they empty your campaign of eligible products.

BeginnerView script
Shopping & PMax

Shopping Search Term Analysis

By Nils Rooijmans

Specifically built for Shopping campaigns. Analyzes search terms triggering your Shopping ads and surfaces negative keyword opportunities at the product group level, so you can add negatives in the right place rather than at the top-of-account level where they might block too much traffic.

IntermediateView script
AlertsDan's pick

Site Down Pauser

By Optmyzr / community

Checks your website URL every 30 minutes. If it returns an error code (404, 500, or any configurable response), all campaigns are paused automatically to stop burning budget on traffic going nowhere. Re-enables campaigns automatically when the site recovers. One of the most universally installed scripts across all account types.

BeginnerView script
AlertsDan's pick

Broken URL Checker

By Nils Rooijmans

Scans every destination URL, sitelink, and callout extension across your account for broken links. Sends a report of all 404s and redirect errors. Run weekly. Product pages get deleted, collections get reorganized, redirects break. Without this script running, broken URLs silently drain budget for weeks before anyone notices.

BeginnerView script
Alerts

Performance Drop Alert

By Mike Rhodes

Sends an email when key metrics (cost, conversions, ROAS) drop below configurable thresholds compared to the previous period. Acts as an early warning system between your regular account check-ins. More useful than scheduled reports because it only triggers when something has actually gone wrong.

BeginnerView script
Keyword MiningLegacy

Search Term Harvester

By Russell Savage

Automatically finds search terms that meet configurable CTR and conversion thresholds and adds them as exact match keywords to the appropriate ad group. One of the original Google Ads automation scripts, still widely used for accounts that rely on broad match and want to build tighter exact match coverage over time.

IntermediateView script
Keyword Mining

Negative Keyword Conflict Finder

By Frederick Vallaeys

Finds cases where your own negative keywords are blocking your intended positive keywords from serving. This is a surprisingly common problem in mature accounts that have accumulated years of negatives. Most practitioners don't run this audit manually, which means the conflicts go undetected for months.

IntermediateView script
Keyword Mining

N-gram Negative Keyword Suggestor

By Nils Rooijmans

A focused variant of n-gram analysis built specifically to identify negative keyword candidates. Surfaces word patterns with high spend and zero (or near-zero) conversions, ranked by wasted budget. More actionable output than the full n-gram analysis script, which surfaces both positive and negative signals simultaneously.

IntermediateView script
Quality Score

QS Impact Calculator

By Nils Rooijmans

Calculates the exact CPC premium or discount each keyword is receiving due to its Quality Score. Turns QS from an abstract number into a real dollar cost you can act on. Useful for prioritizing which keywords to improve first when QS varies significantly across your account.

BeginnerView script
Quality Score

Low QS Keyword Pauser

By Optmyzr

Pauses keywords below a configurable Quality Score threshold. Has a report-only mode so you can review the candidates before any changes go live. Useful for large accounts where manually finding and pausing every keyword below QS 4 is too time-consuming to do in the UI.

BeginnerView script
Quality Score

Quality Score Account Overview

By Nils Rooijmans

Generates a full spreadsheet breakdown of QS across your entire account, segmented by campaign and ad group. Includes the QS component scores (Expected CTR, Ad Relevance, Landing Page Experience) so you can see exactly which component is dragging each keyword down.

BeginnerView script

Looking for something specific?

Nils Rooijmans alone curates 400+ scripts. These are the libraries worth bookmarking.

See the best libraries
Opinionated picks

The starting stack I'd install on every ecommerce account

If you're starting from scratch and want to know which scripts to prioritize, these are the seven I would run on any ecommerce Google Ads account on day one. They cover the critical gaps (PMax visibility, feed health, site uptime, budget tracking) and take less than an hour to set up in total.

7 scriptsDay-one installsUnder an hour in total
Dan KabakovPicked by Dan Kabakov, Google Partner
  1. 01

    PMax Insights Script

    Performance Max is where most ecommerce budget goes. Without this script you have no visibility into what's actually driving results inside it.

    mikerhodes.com.au
  2. 02

    N-gram Search Term Analysis

    Ecommerce accounts generate huge search term volumes. This script surfaces the negative keyword patterns that are quietly draining budget every week.

    github.com/Brainlabs-Digital
  3. 03

    Merchant Center Monitor

    Feed disapprovals silently remove products from Shopping and PMax. This script catches them before they hollow out your campaigns.

    ads-scripts.com
  4. 04

    Broken URL Checker

    Ecommerce sites constantly reorganize URLs. Broken destination URLs mean paid clicks going to 404 pages. Run this weekly.

    nilsrooijmans.com
  5. 05

    Site Down Pauser

    Site outages happen. When they do, you want your ads to pause within 30 minutes, not 3 hours. Set this once and forget it.

    optmyzr.com
  6. 06

    Budget Pacing Alert

    Basic hygiene. Prevents the budget overshoot you only discover when the invoice arrives at the end of the month.

    mikerhodes.com.au
  7. 07

    Quality Score Historical Tracker

    QS is one of the most actionable levers in a Search campaign. Without historical logging you cannot tell if your work is actually improving it.

    ppc.io
Where to find more

The best Google Ads script libraries and resources

These are the sources worth bookmarking. Between them they cover almost every Google Ads automation need, and the community around them is active enough that new scripts appear regularly.

Official

Google Ads Scripts Official Docs

The canonical reference for syntax and API objects. Includes a full code examples library organized by functionality. Start here when something breaks.

developers.google.com
Individual · 400+ Scripts

Nils Rooijmans

The largest single curated collection anywhere. 400+ scripts delivered via Google Sheet on email signup. Covers Shopping, PMax, QS, budgets, and more. The most comprehensive free library in the space.

nilsrooijmans.com
Individual · PMax Specialist

Mike Rhodes

Best known for the PMax Insights Script (free v28 on GitHub, paid at $199 one-time). Free scripts include budget pacing, QS tracker, and daily account summary. Trusted by major global agencies.

mikerhodes.com.au
Agency · Open Source

Brainlabs (GitHub)

Award-winning scripts open-sourced by one of the largest performance agencies. Well-maintained, production-grade code. Includes n-gram analysis, auction insights tracking, and anomaly detection.

github.com/Brainlabs-Digital
Individual · Original Scripts

Russell SavageLegacy

One of the original Google Ads script authors. FreeAdWordsScripts.com is a long-running blog with scripts for QS reporting, label management, account cleanup, and Google Drive integration. Scripts may not be compatible with the current Google Ads API.

freeadwordsscripts.com
Ex-Google Engineer · Gists

Frederick Vallaeys (Optmyzr)

Former Google AdWords Evangelist and Optmyzr CEO. Publishes scripts on GitHub Gists covering n-gram analysis, AI-assisted RSA generation, and PMax search term categorization. Highly technical, high quality.

gist.github.com/siliconvallaeys
Store · Configured Scripts

ads-scripts.com

Scripts designed for non-technical users and MCC-level agencies. All configured via Google Sheet, no code editing required. Includes a PMax Asset Group report, Merchant Center monitor, and budget trackers. Mix of free and paid.

ads-scripts.com
Curated Directory

Optmyzr Enhanced Scripts

Optmyzr wraps popular scripts in a no-code interface so you configure parameters through a UI instead of editing code. Covers budgets, bid adjustments, site monitoring, and QS management. Requires an Optmyzr subscription.

optmyzr.com
Getting started

How to install a Google Ads script in 5 steps

Installing a script takes under 5 minutes for most of the ones in this library. The process is the same regardless of which script you choose.

How often to run them
  • HourlySite monitors
  • DailyBudget and reporting scripts
  • WeeklyAnalysis scripts like n-gram and broken URLs
  1. 1

    Open the Scripts section in Google Ads

    In your Google Ads account, go to Tools → Bulk Actions → Scripts. In a Manager (MCC) account you'll find Scripts under the same Bulk Actions menu.

  2. 2

    Create a new script

    Click the blue + button to create a new script. Give it a descriptive name (e.g. "Budget Pacing Alert, Monthly"). The editor will open with a blank JavaScript file.

  3. 3

    Paste the script and configure variables

    Copy the script code from its source and paste it into the editor. Most scripts have a configuration section at the top with variables you need to set: your email address, budget thresholds, or a Google Sheet URL. Edit only those values.

  4. 4

    Authorize and preview

    Click Authorize to grant the script access to your account data. Then click Preview to run the script in read-only mode. This lets you see what it would do without making any changes. Check the logs at the bottom for errors before running for real.

  5. 5

    Set a run schedule

    Click Save, then set the frequency: Hourly (for site monitors), Daily (for budget and reporting scripts), or Weekly (for analysis scripts like n-gram and broken URLs). Most scripts in this library include a recommended frequency in their documentation.

FAQ

Frequently asked questions

Are Google Ads scripts free to use?

Yes. All the scripts in this library are free. Running scripts inside Google Ads costs nothing. The only scripts that carry a fee are premium versions like Mike Rhodes' paid PMax script ($199 one-time), which offers additional features beyond the free version. Everything else listed here is fully free.

Do I need to know how to code to use scripts?

Not anymore. In 2026, the practical barrier is much lower than it used to be. Most scripts have a clearly marked configuration section at the top where you fill in your email address, thresholds, and Google Sheet URLs. For anything else, you can paste the script into Claude or ChatGPT, describe what you want to change, and get a modified version in seconds. You do not need to write scripts from scratch.

Can scripts break my Google Ads account?

A poorly written or misconfigured script can make unintended changes (pausing keywords, modifying bids). The risk is manageable: always run a script in Preview mode first, which executes everything but makes no changes to your account. The scripts in this library are community-tested and widely used, but you should always review what a script does before running it live. Google Ads does maintain a Change History log so any script changes can be identified and reversed.

How often should I run scripts?

It depends on the script's purpose. Site monitors and budget alerts should run hourly. Daily reporting scripts (account summary, budget pacing) run once a day. Analysis scripts like n-gram analysis or broken URL checks are best run weekly, because the underlying data needs time to accumulate before patterns become meaningful. Most scripts note their recommended frequency in their own documentation.

Do scripts work with Performance Max campaigns?

Yes, though with limitations. Google Ads Scripts can pull PMax data that is available via the Google Ads API, which includes some campaign-level metrics, asset group data, and search category reports. What scripts cannot access is data Google does not expose via the API at all. Mike Rhodes' PMax Insights Script is the most thorough publicly available solution for PMax visibility via scripts.

What is the difference between single-account and MCC scripts?

Single-account scripts run inside one Google Ads account and can only access data from that account. MCC-level scripts run inside a Manager account and can loop through all child accounts, making them useful for agencies managing multiple clients. Most scripts come in both versions. If you only manage one account, the single-account version is all you need.

Free audit

Want to know which of these your account actually needs?

Spending under $5,000 a month, or running it yourself? Take the quiz to find your next step.