Google Ads scripts: the alerting that stops you burning budget
TL;DR
- In search ads, money is lost mostly to things that change outside Google Ads and no one catches in time.
- A script watches 24/7: broken links, CTR/CPC/CPA anomalies, zero impressions, pacing, Impression Share, Quality Score and negatives.
- By default the script alerts (email or Slack); it only gets autonomy to act when the trigger is unambiguous.
- Advanced case: tie campaigns to the weather by region - start, pause or swap creatives depending on conditions.
- Generic scripts are enough for most cases; proprietary logic is reserved for ecommerce and lead generation.
A Google Ads script is JavaScript that runs on its own - hourly or once a day - and checks, changes or pauses whatever you define in the account, from your own rules or from external data. I use them for a simple reason: in search ads, waste is silent. No one emails you to say "your landing page returns a 404" or "the CPC on this term tripled overnight". A script does.
The waste no one sees
The worst money leaks I've seen didn't come from bad campaign decisions - they came from changes made outside Google Ads, with no one warned. Three real cases:
- A client changed a URL on a SEO partner's advice and set no redirect. It was the campaign's main keyword; traffic dropped around 80%.
- Another simply deleted a page, without telling anyone.
- Another changed the content of a page optimized for the relevance that underpins Quality Score. On that search term, the CPC shot up about 5× - a real extreme case, not the typical one (a QS-component change usually moves CPC between 16% and 33%).
The common thread: Google Ads kept spending, and the alarm would only ring when someone looked at the numbers - days later. The mechanism is known: Ad Rank is your bid times Quality Score, and landing page experience is one of its components. A broken or less relevant page raises the cost per click and lowers your position. A script catches this the same day.
The triggers I monitor
There's no universal threshold - there's what the account needs. These are the triggers worth having:
- Links and 404s: landing pages that return an error (Google's native Link Checker template does exactly this).
- Metric anomalies: CTR drops, CPC and CPA spikes, conversion-rate drops.
- Zero impressions: an active campaign that didn't serve a single impression the day before.
- Pacing: spend ahead of or behind the monthly target.
- Impression Share: Search Lost IS (Budget) and (Rank).
- Quality Score: drops by component.
- Toxic search terms and negative keyword lists.
The ones that saved me the most money, over the years, were negative keywords and Quality Score.
Thresholds I use - and the trade-off
There's no magic number; there's the trade-off between catching early and alerting too much. My starting points: CTR falling more than 50% over 5 days; CPC rising more than 10% day over day. And the market benchmarks I cross-check against mine:
- CPA above +20% versus the 14-day average.
- Conversion rate falling more than 20% per campaign (a classic sign of a broken landing page or tracking).
- Impression Share dropping more than 10%.
- Pacing deviating more than 15% from the monthly target.
- IS Lost to Budget above 30% on a profitable CPA - a clear signal to raise budget.
My rule: I start conservative (less noise, more confidence in the alert) and only tighten thresholds where the campaign is critical.
Alert vs act
By default, the script alerts; I only let it act when the trigger is unambiguous and the cost of doing nothing is greater than the cost of an automated action. Alert (email or a Slack integration) for most - CTR, CPC, CPA, pacing, Impression Share, Quality Score. Automated action (pause a campaign or ad, cut a keyword) only where there's no ambiguity: a landing page returning a 404, or spend spiking far above plan. A script only earns autonomy when I'd trust it with my eyes closed at 3 a.m.
An advanced case: weather-based bidding
One of the most underrated uses is tying campaigns to the weather, by region. The script reads a sheet of campaigns and locations, calls a weather API (OpenWeatherMap, for example) and - depending on temperature, precipitation, wind, UV index or pollen - starts or pauses campaigns, swaps ad copy or adjusts bidding, market by market. Where it makes sense:
- Sunscreen and skincare when the UV index rises.
- Cold and flu remedies and decongestants in flu season.
- Allergy medicine when pollen counts spike.
- Umbrellas and rainwear in the rain; coats, gloves and snow blowers in the cold.
- Air conditioning and fans in the heat; parks, golf courses and gardening on sunny days.
- Services like waterproofing or roofing during storms.
The technical caveat, to be honest with the reader: with Smart Bidding (tCPA/tROAS), Google ignores manual bid adjustments (except the -100% device modifier). In Smart Bidding accounts, the value of a weather script is in starting and pausing campaigns, moving budgets or swapping creatives - not in bid modifiers. With manual or eCPC bidding, that's where weather-based bid adjustments do work.
Native, rules or third-party?
For most cases, generic scripts are enough. Google's automated rules solve the simple stuff; a custom script comes in when the logic is conditional or crosses external data. My line: generic for standard monitoring, and proprietary scenarios - my own rationale - in lead generation and ecommerce, where the business logic is specific. Where to get ready-made scripts: Google's official docs and gallery, Google Ads Scripts, and reputable community libraries like WordStream and Koozai.
What I don't automate
I automate detection, not strategy. And there's one thing I'm still not a fan of: dynamic keyword insertion (DKI). After several years, I stay away from it in most cases - it drops into your ads terms that may not be best for brand safety or performance (Google can insert what the user searched, including competitor terms, misspellings or language you don't control). The exception is ecommerce and product feeds, where the inserted term is the product itself. A note of rigor on Quality Score: in accounts with Smart Bidding and broad match, the visible QS (1-10) loses predictive power - it uses 90-day exact-match data. Use it as a diagnostic, not as a standalone KPI. This is the kind of work - detection, measurement and decision - I do in Google Ads.
Common mistakes and how to do it right
Automating badly is burning budget efficiently. What separates those in control from those who only react:
| Avoid | Do |
|---|---|
| ✗ Running search ads with no automated monitoring at all | ✓ Having scripts watch 404s, CPC/CPA anomalies and zero impressions 24/7 |
| ✗ Giving a script autonomy on an ambiguous trigger | ✓ Alerting by default and only letting it act where the trigger is unambiguous |
| ✗ Using weather-based bid modifiers with Smart Bidding | ✓ With Smart Bidding, act via pause, start, budget and creatives, not bids |
| ✗ Using dynamic keyword insertion everywhere | ✓ Avoiding DKI outside ecommerce and feeds, for brand safety and performance |
Tools I use and recommend
- Google Analytics 4Behaviour and conversion measurement.
- Google Search ConsoleOrganic performance, coverage and field Core Web Vitals.
- SemrushKeywords, site audit and competitor analysis.
Sources
- Google Ads Scripts - Product overview (Google for Developers)
- Get impression share data - Google Ads Help
- Automate bid adjustments using the AdWords weather script - Cypress North
Frequently asked questions
Do I need to know how to code to use Google Ads scripts?
It helps, but it's not required. The galleries - Google's official one and the community's - have ready-to-paste scripts; you set the API key and your thresholds. Google Ads account structure →
Do scripts work with Smart Bidding?
For monitoring and alerts, yes. For bid modifiers, no - Smart Bidding ignores them; there the value is in pausing or starting campaigns, budgets and creatives. Performance Max →
How often does a script run?
Hourly or once a day. Most alerting runs daily; spend or 404 checks can run hourly. Google Ads service →
Native scripts or paid tools?
Generic ones are enough for most; paid tools add management and scale, but the core alerting is done with scripts. How much to invest →
Which script saves the most budget?
In my experience, negative keywords and Quality Score - they attack the two biggest leaks: irrelevant clicks and expensive clicks. Quality Score →