Google Ads

Google Ads Scripts

Also called scripts

Small JavaScript programs that run inside a Google Ads account on a schedule, to automate checks, alerts, reports and routine changes.

Quick facts: Google Ads Scripts

Category
Google Ads
Also called
scripts
Level
Advanced
Affects
Account monitoring, budget control, reporting time, speed of spotting problems
Where to see it
Google Ads (Tools, Bulk actions, Scripts), Google Sheets, email alerts, manager account scripts
In this article4
  1. How Google Ads scripts work
  2. Why it matters
  3. Common mistakes
  4. How to act on it

Google Ads scripts are short programs written in JavaScript that run inside your Google Ads account on Google’s servers. They can read performance data, make changes, write to Google Sheets and send emails, on a schedule you choose, without any software of your own.

How Google Ads scripts work

You add a script under Tools, then Bulk actions, then Scripts. You paste or write the code, authorise it to act on the account as your user, and run a preview. The preview shows what the script would change and what it logged, without changing anything. Once you are happy, you schedule it: once, daily, weekly, monthly or as often as hourly.

Scripts work through objects for campaigns, ad groups, keywords, ads and so on, and can also run reports with Google Ads Query Language, the same query language the Google Ads API uses. They can open a Google Sheet to read settings or write results, fetch a web page to check it loads, and email someone when a condition is met.

Each run has a time limit of around half an hour, so scripts that process very large accounts need to be written carefully. A script installed in a manager account can work across many client accounts in one run.

Why it matters

A Google Ads account can go wrong in ways nobody notices for days. A landing page returns an error after a website update, a campaign stops spending because a payment failed, or spend doubles because a bid strategy has gone wild. A script checking every hour turns a week of wasted budget into an email within the hour.

Useful examples for a UK business include:

  • A link checker that visits every final URL and emails you if any return an error.
  • A budget pacing alert that warns when monthly spend is running ahead of plan.
  • An anomaly alert comparing today’s clicks, cost and conversions with the same weekday in previous weeks.
  • A weekly export of the search terms report to a Google Sheet, with single words grouped so wasteful themes stand out.
  • Pausing ads for products that a stock sheet marks as sold out.

Google’s built-in automated rules cover simple jobs such as pausing a campaign at a set time. Scripts go further, because they can apply logic, compare periods and talk to sheets and websites.

Common mistakes

  • Running code copied from a forum without reading it. A script acts with your permissions and can change bids, pause campaigns or send data to a sheet someone else owns.
  • Scheduling a script that changes things before running it in preview.
  • Forgetting scripts exist. Old scripts keep running after staff or agencies change, sometimes undoing new work.
  • Sending alerts to an inbox nobody reads, such as a former employee’s address.
  • Building a fragile script for a task that a standard report or rule already handles.

How to act on it

Open the Scripts page in your account and list what is there, who authorised each one, when it last ran and where its output goes. Remove anything nobody can explain. If you have none, start with a link checker and a spend anomaly alert, since they only report and cannot damage anything.

Keep a simple record of each script’s purpose, the sheet it uses and who receives its emails. I set up monitoring scripts like these as part of managing Google Ads accounts, so problems surface quickly rather than at the end of the month.

Do and do not

Do

  • Preview a script before scheduling it, and read the log
  • Start with scripts that report or alert before any that change bids or pause items
  • Note who installed each script and what it does in its name or description

Do not

  • Paste in code you do not understand from an unknown source
  • Give a script authorisation to an account it does not need
  • Leave old scripts running after the person who wrote them has gone

Questions people ask about this

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

Not to install a well-documented script, which usually means pasting the code and editing a few settings at the top. You do need enough understanding to know what it will do, so read the description and run a preview first. Writing or adapting scripts needs basic JavaScript.

Are Google Ads scripts safe?

They are as safe as the code you run. A script acts with your account permissions, so a careless or malicious one could change bids, pause campaigns or copy data to a sheet someone else controls. Only use scripts from sources you trust, read them, and preview before scheduling.

What is the difference between scripts and automated rules?

Automated rules are point-and-click instructions such as "pause this campaign if cost exceeds £200 today". Scripts are code, so they can compare time periods, read Google Sheets, check web pages and send detailed emails. Use rules for simple, single-condition jobs and scripts for anything more involved.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.