Google Ads scripts
Google Ads scripts are pieces of JavaScript code that run inside Google Ads, on demand or on a schedule, to read an account's data, change it and send reports.
How it works
You write scripts in an editor inside the account; Google says entry-level JavaScript is enough. Scripts can reach most Google Ads features, such as reports, bids, budgets and statuses, and outside data like a spreadsheet. A script runs on demand, or on a schedule with no one signed in. A manager script works across the client accounts under a manager account instead of one script per account.
A run is cancelled after 30 minutes, or up to 60 for manager scripts that process accounts in parallel with a callback. In Shopping, scripts manage existing campaigns, product groups and their bids, and run Shopping reports. They cannot create a Shopping campaign, set its campaign-level properties or link Merchant Center. Which scripts a store should run: Google Ads scripts for online stores.
Where you see it
- Google Ads: Tools → Bulk actions → Scripts, with Preview, Run and Script history.
- Google Ads API:
change_eventmarks changes made by scripts with the client typeGOOGLE_ADS_SCRIPTS.
Example
Example store, not client data.
The tableware shop schedules a daily script to flag products that spend without selling. It lists products with no orders in 30 days and spend above three times the shop’s cost per order: 3 × 133 = 399. Of the 1,200 products with impressions, 45 cross the line. The script writes them to a spreadsheet, and a person decides which to exclude.
Not to be confused with
- Automated rules — set in a form, without code. Google suggests them for bulk changes when you don’t want to code.
- Google Ads API — for your own software on your own servers. Scripts run on Google’s side.
Right and wrong readings
- Wrong: “Preview showed the right changes, so the real run will do the same.” Right: preview changes no Google Ads data, so code that creates an item and then looks it up behaves differently. Email and spreadsheet calls, however, run for real.
- Wrong: “The script timed out, so nothing changed.” Right: changes made before the 30-minute cut-off stay applied.
Sources
- Product overview — JavaScript, scheduling, manager scripts, alternatives. Checked 2 October 2026.
- Get started — where scripts live. Checked 2 October 2026.
- Limits — run time limits. Checked 2 October 2026.
- Preview Mode — what preview runs. Checked 2 October 2026.
- Shopping campaigns — the limits in Shopping. Checked 2 October 2026.
- ChangeClientType — Google Ads API:
GOOGLE_ADS_SCRIPTS. Checked 2 October 2026.