What does this Google Ads script do?

Paste a Google Ads script before you run it. This says in plain words what it reads, what it changes and where it sends data. It reads the text only and never runs the script, and the script never leaves your browser.

What it checks

  • What the script reads. Selectors such as AdsApp.campaigns(), keywords() and ads(), reports and searches, and the resource a query names, for example FROM search_term_view.
  • What it changes. Pausing, enabling and removing, bids, budgets and bidding strategies, names, labels, negative keywords, URLs, anything made with a builder, AdsApp.mutate and bulk uploads.
  • Where it connects. Addresses called with UrlFetchApp, email recipients, Google Sheets, Drive, BigQuery, databases, and chat webhooks recognised by their address.
  • Danger signs. eval and new Function, code that is downloaded and then run, base64 next to execution, minified or scrambled code, keys and tokens, and email addresses that are not placeholders.
  • Reach and age. Manager account scripts that act on many accounts, AdWordsApp and AWQL from older scripts, and methods that Google's reference marks as deprecated.
  • Points of care. No check for preview mode, selectors with no condition and no limit, waits, and settings you have to fill in first.

Comments and text in quotes are set aside before the code is matched, so a method name inside a comment is not counted as a call. Addresses and email addresses inside quotes are still found. Every finding shows its line.

What it cannot do

It reads text and never runs the script. Anything decided while the script runs is out of sight: a method name built from pieces, a query put together from settings, an address read from a spreadsheet.

It finds a change wherever it is written, but it does not follow which values reach it. When it cannot tell what a line acts on, it says likely, not certain.

It does not judge whether the logic is sound or whether the thresholds suit your account. A script can be exactly what it claims to be and still pause the wrong keywords.

Read-only means no change was found in the text. It is a reason to preview with less worry, not a guarantee. Scripts longer than 300,000 characters are read up to that point.

Questions

Is my script uploaded anywhere?

No. The reading happens inside your browser and the page sends nothing to a server. Once the page has loaded, it works with your internet connection switched off.

Does a preview make a script safe to try?

For changes to your campaigns, yes. Google's guide to preview mode says a preview makes no changes to the actual campaign data and shows what would have changed. It does not hold back the rest: the same guide says an email sent with MailApp goes out in a preview too, and spreadsheets are updated.

Why is downloaded code the strongest warning?

Because the script you read is not the script that runs. When a script fetches code from a web address and executes it, whoever controls that address can change the code later, and every run after that uses the new version with the same access to your account.

The script says AdWordsApp or uses a name like KEYWORDS_PERFORMANCE_REPORT. Does it still work?

This page cannot tell you whether it still runs. What Google's documentation says is this: the reference lists AdsApp and not AdWordsApp, and the best practices guide says AWQL still works for reports and conditions but is not recommended. Both are signs of an older script, so look for a current version first.