# Google Ads Scripts Every Ecommerce Account Should Run

Google Ads scripts every ecommerce account should run: the alerts, link checks, stock and Shopping scripts that matter, and how to install them safely.

By Ecom Graded editorial. Published 2026-11-25, last checked 2026-11-25. Canonical: https://ecomgraded.com/guides/google-ads-scripts-ecommerce

It is Monday morning and the weekend numbers look wrong. Google Ads spent the full budget on Saturday and Sunday, yet the Conversions column shows zero for both days, and Shopify shows orders as normal. Somewhere on Friday an app update or a change in Shopify's Customer events settings broke the purchase tag, and nothing told you. Google Ads scripts exist for exactly this moment: small pieces of code that watch your account while nobody else does.

> **Short version:** Google Ads scripts are free JavaScript programs that run inside your Google Ads account on a schedule. Every ecommerce account should run four alert scripts: an anomaly alert, a zero conversion alert, a budget pacing check and a broken link checker. Stores with Shopping campaigns should add a zero impression product report and a product labeler. Start with scripts that only send alerts.

## What Google Ads scripts are and what they can do

Google Ads scripts are short JavaScript programs that you paste into your Google Ads account, where Google runs them on its own servers on a schedule you choose. They can read almost anything in the account, send you an email, write to a Google Sheet and, if you let them, make changes such as pausing an ad or adjusting a budget.

There is no extra charge for scripts; they come with every Google Ads account. You do not need a server, a developer account or any software installed. You need someone willing to read the code before running it, which is less daunting than it sounds, because most useful scripts are a few hundred lines with the settings gathered at the top.

### Scripts vs automated rules

Automated rules are the no-code option in Google Ads: you pick a condition from a menu, such as cost above a set amount, and an action, such as pause or send an email. Rules suit simple, single-condition jobs and need no code at all.

A Google Ads script does what a rule cannot. It can compare today with the same weekday last week, visit your landing pages to check they load, combine data across campaigns, read a Google Sheet and write results back to one. When a job needs logic, memory or anything outside the account, it needs a script.

### Are AdWords scripts the same thing?

Yes. Google renamed AdWords to Google Ads in 2018, and AdWords scripts became Google Ads scripts. Many free scripts you will find online were written under the old name. Older scripts may use functions Google has since retired, so a script from a forum post several years old should be previewed carefully before you trust it.

## The Google Ads scripts every ecommerce account should run

Every ecommerce account should run a zero conversion alert, an anomaly alert, a broken link checker and a budget pacing check, then add Shopping and search term scripts that fit the account. Together they cover tracking that silently stops, spend that runs away, links that break and products that never get shown, and most of them only report, which makes them safe to run from the first day.

| Script | What it catches | How often to run | Changes the account? |
| --- | --- | --- | --- |
| Account anomaly alert | Spend, clicks or conversions far from their usual level | Hourly or daily | No, alerts only |
| Zero conversion alert | Conversion tracking that stopped recording sales | Hourly or daily | No, alerts only |
| Budget pacing check | Monthly spend running ahead of or behind plan | Daily | Usually no; some versions adjust budgets |
| Broken link checker | Ads and sitelinks pointing to error or missing pages | Daily or weekly | No, alerts only |
| Out of stock pauser | Search ads sending clicks to sold out product pages | Hourly or daily | Yes, pauses and re-enables ads |
| Zero impression product report | Products in the feed that Google never shows | Weekly | No, writes to a Google Sheet |
| Product performance labeler | Best sellers and non-sellers, written as a label value | Daily or weekly | Indirectly, through a supplemental feed |
| N-gram search term report | Words that spend across many search terms without sales | Weekly | No, you add negatives yourself |
| Negative keyword conflict check | Negative keywords that block your own keywords | Weekly or monthly | No, alerts only |

*Scripts depend on Google's APIs, which change. Read each script and check Google's scripts documentation before you run it. Last checked November 23, 2026.*

Listing order follows the order of this guide, not importance. If you only install three, make them the zero conversion alert, the anomaly alert and the broken link checker, because those catch problems that waste the whole budget rather than a slice of it.

## Safety scripts: catch problems before they cost money

Safety scripts are alert-only scripts that compare what the account is doing now with what it normally does, and email you when the gap is too large. They make no changes, so the worst a badly set one can do is send too many emails.

### Account anomaly alert

An anomaly alert is a script that checks each hour or day whether impressions, clicks, cost or conversions are far above or below their usual level for that time of day and weekday. Google has published an account anomaly detector in its own library of sample solutions; check Google's scripts documentation for its current version.

The useful setting is the threshold. Set it too tight and you will get an email every time a Tuesday is quieter than usual, and you will learn to ignore it. A sensible start is to alert only when a metric is roughly half or double its normal level, then tighten once you see how noisy your account is.

### Zero conversion alert

A zero conversion alert is a script that emails you when the account, or a campaign that normally converts, has spent money for a set number of hours with no conversions recorded. It is the single script that would have caught the Monday morning scene above on Friday evening.

Set the window to fit your volume. Say a store usually records a purchase every hour or two: a six hour window with spend and no conversions is a strong signal that tracking broke. A store with a handful of orders a day needs a longer window, perhaps a full day, or the alert will fire on quiet afternoons. When the alert does fire, our guide to [conversion tracking setups graded](https://ecomgraded.com/guides/conversion-tracking-setups-graded) explains where Shopify purchase tracking usually breaks and how each setup fails.

### Budget pacing check

A budget pacing script compares spend so far this month with a monthly budget you type into the script or a Google Sheet, and tells you whether you are on course to overspend or underspend. Google Ads works with daily budgets and can spend up to twice the daily budget on a given day, so a monthly figure in your head can drift from what the account is actually doing.

Some pacing scripts go further and lower daily budgets automatically when spend runs ahead. Start with the reporting version. Automatic budget changes interact with Smart Bidding and can throttle a campaign just as a sale begins, which is a decision a person should make.

## Store health scripts: broken links and sold out products

Store health scripts check the pages your ads point to, because a click that lands on an error page or a sold out product is money spent with no chance of a sale. These scripts visit your own URLs, so they catch problems that Google Ads itself may not flag for days.

### Broken link checker

A broken link checker is a script that requests the final URL of every active ad, keyword and sitelink and records the response code, so you hear about a page that returns an error or a 404 before your customers do. Google has included a link checker among its sample solutions as well.

Ecommerce stores break links constantly: a collection gets renamed, a product handle changes, a seasonal page is deleted after the sale ends. Run the checker daily if you edit the store often, weekly if you do not, and have it write the broken URLs to a Google Sheet so you can fix them in one sitting.

### Out of stock pauser for Search ads

An out of stock pauser is a script that visits each product page used in your Search ads, looks for your store's sold out text or a stock flag, pauses ads or ad groups for products that are unavailable and re-enables them when stock returns. It is one of the few scripts worth letting make changes, because the change is narrow and reverses itself.

Shopping and Performance Max campaigns handle stock through the feed: when a product's `availability` attribute says `out_of_stock`, Google stops showing it. Search ads have no such link, which is why a store that runs Search campaigns for individual products or collections needs this script. Test it on one campaign first and make sure it reads the right text, since a theme change can rename "Sold out" and make every product look in stock.

> **Watch out.** A script runs with your access to the account. Any script that pauses, enables or changes budgets can do so across every campaign it can see. Read the settings at the top, run Preview first, and limit a new script to one campaign by name or label until you have watched it for a week or two.

## Google Shopping scripts: products, labels and the feed

Google Shopping scripts are scripts that work at the product level, reading how each item in your Merchant Center feed performs and turning that into a report or a label. They matter most for catalogs of a few hundred products or more, where nobody can check every item by hand.

### Zero impression product report

A zero impression product report is a script that lists every product that is approved in Merchant Center but received no impressions, or almost none, over a period such as the last 30 days. Imagine a catalog of 2,000 products where a few hundred never show: common causes are weak titles, missing attributes or prices that are not competitive, and the report tells you which products to look at.

Run it weekly and write the list to a Google Sheet. Sort by product type to see whether the problem is one category or spread across the catalog, then fix the titles and attributes for the biggest group first.

### Product performance labeler

A product performance labeler is a script that sorts products by results, for example best sellers, steady sellers and products with clicks but no sales, and writes a value for each product ID into a Google Sheet. You connect that Google Sheet to Merchant Center as a supplemental data source, which is a secondary feed that adds or overrides attributes on products from your main feed, and the values arrive as a custom label.

Your Shopping or Performance Max campaigns can then split products by that label and give best sellers their own budget. This is one of the most valuable Google Shopping scripts for a store that sells across a wide range of products. Our guide to [custom labels in Google Shopping](https://ecomgraded.com/guides/custom-labels-google-shopping) covers how to plan the five label slots so a script label does not overwrite one you already use.

### Disapproval and feed alerts

A disapproval alert is a script that counts disapproved or limited products and emails you when the number jumps. Merchant Center sends its own notifications, but a script can send a short daily count to the person who actually fixes the feed.

Scripts that read Merchant Center directly rely on Google's Merchant Center APIs, which Google has been changing, so check that such a script still runs after any announced API change. When an alert fires, our list of [every common Merchant Center disapproval and the fix](https://ecomgraded.com/guides/merchant-center-disapprovals-fixes) covers what each issue means.

### What Google Ads scripts can do for Performance Max

Google Ads scripts can report on Performance Max campaigns but cannot steer them in the detail Search or Standard Shopping allow. Scripts are mainly useful for Performance Max as a way to pull data into a Google Sheet on a schedule.

As of November 2026, Google has been adding more Performance Max reporting, including search term and channel data in many accounts, and scripts can export whatever the API exposes. A common pattern is a script that copies product, search category and asset group results into a Google Sheet each week, so you can see trends the interface makes hard to compare. Treat any script promising control beyond that with care, and check Google's scripts documentation for what Performance Max objects support.

## Search term scripts: n-grams and negative keywords

Search term scripts read your search terms report and show where spend goes on words that do not sell. They report rather than act, because deciding what to exclude needs someone who knows the products.

### N-gram search term report

An n-gram report is a script that breaks every search term into single words and word pairs, then adds up cost, clicks and conversions for each one across all terms. A word like "free", "cheap" or "repair" may never look expensive in a single search term, but summed across hundreds of terms it can be a large share of spend with no sales.

Run it weekly over the last 30 to 90 days, sort by cost with zero conversions, and add the clear losers as negative keywords at campaign or account level. It works for Search and Standard Shopping campaigns, and for Performance Max to the extent Google exposes search term data for your campaign.

### Negative keyword conflict check

A negative keyword conflict check is a script that finds negatives that block your own active keywords, for example a negative "kids" in an account that bids on "kids running shoes". Conflicts creep in as negative lists grow, and Google has published a sample script for this job too. Run it monthly, or after any large batch of new negatives.

## How a script run works, and when to let it make changes

Every run follows the same path: the schedule fires, the script reads account data, checks it against your rule, and then either stops, alerts you or changes something. The safe habit is to start every script in alert mode and only switch on changes once its alerts have been right for a few weeks.

*Diagram: How a Google Ads script run works. Every script run follows this path. Keep new scripts on the highlighted alert path until their alerts have proved accurate, then allow changes on a single campaign.*

## How to install a Google Ads script safely

Installing a script is a short job: create it, paste the code, set the options at the top, authorize it, preview it, then schedule it. The preview step is the one people skip and the one that matters most.

1. **Open the scripts page.** In Google Ads, open Tools, then Bulk actions, then Scripts. Google moves menus from time to time, so if the path differs, search for "Scripts" in the Google Ads search bar.
2. **Create a new script and paste the code.** Click the plus button, give the script a clear name such as "Zero conversion alert, all campaigns", delete the placeholder code and paste the script.
3. **Edit the settings block.** Most scripts keep their options at the top: your email address, a Google Sheet URL, thresholds and campaign name filters. Change only those lines unless you know JavaScript.
4. **Authorize the script.** Google asks you to grant the script access to your account, and to Gmail or Google Sheets if it uses them. Read what it asks for; an alert script has no reason to request more than it needs.
5. **Click Preview.** Preview runs the script without making any changes and shows what it would have done in the Changes and Logs tabs. Check that the numbers match what you see in the account.
6. **Schedule it.** Set the frequency to hourly, daily, weekly or monthly. Google limits a single run to 30 minutes, so very large accounts may need a script that processes campaigns in batches.

Free scripts are widely shared by Google and by people who run ad accounts. That is a strength, but it means you are running code written by a stranger. Prefer scripts with clear comments and a settings block, avoid any that send data to an outside URL you do not recognize, and keep a copy of each version you run in a Google Doc or a code repository.

### Common mistakes with Google Ads scripts

Most problems with scripts come from how they are run rather than from the code. These are the patterns that show up again and again in ecommerce accounts.

- **Alerts nobody reads.** An alert sent to a shared inbox that nobody checks, or to someone who has left, is the same as no alert. Send alerts to a person, and test them by lowering a threshold once.
- **Thresholds that cry wolf.** Too many alerts teach you to ignore all of them. Loosen thresholds until an alert means something.
- **Scripts that fail quietly.** When a script errors, the run is marked as failed on the scripts page, with details in its log. Open the scripts page monthly and check each script's last run, because an API change can stop a script without anyone noticing.
- **Changes before trust.** A script that pauses or relabels on day one can turn off your best sellers on a bad data day. Keep it in alert mode first.
- **Two tools doing one job.** A pacing script and a software rule both adjusting budgets will fight each other. Give each job to one tool.

## Google Ads scripts vs PPC management software

Scripts are free and flexible but need someone to install, read and maintain them; PPC management software packages many of the same checks behind an interface, for a subscription. Neither is better for every store; the choice turns on who looks after the account.

- **Automated rules:** No code and built into Google Ads. Suits simple single-condition jobs, such as pausing a campaign at a set cost. Cannot check landing pages, compare periods flexibly or write to a Google Sheet.
- **Scripts:** Free and able to do almost anything the account data allows. Suits a store with someone comfortable reading code or an agency that maintains them. Scripts break when Google changes its API and need checking.
- **PPC software:** Alerts, reports and rules behind an interface, maintained by the vendor. Suits teams that want the checks without the code. Costs a subscription; check each vendor's pricing page for current plans.

If you are weighing software, our guide to the [best PPC management software for Google Ads](https://ecomgraded.com/guides/best-ppc-management-software) compares the main options and who each one suits. Many accounts end up with both: software for daily management, and a handful of scripts for checks specific to the store.

## How to choose the best Google Ads scripts for your store

The best Google Ads scripts for a store are the ones that match how the account can fail, not the longest list you can find. Pick by what you run and what has gone wrong before.

- **Every account:** the zero conversion alert, the anomaly alert, the broken link checker and a budget pacing check.
- **Standard Shopping or Performance Max with a feed:** add the zero impression product report and the product performance labeler.
- **Search campaigns on product or collection pages:** add the out of stock pauser and the n-gram report.
- **Accounts with long negative keyword lists:** add the negative keyword conflict check.

Agencies and freelancers that manage many stores usually run scripts from a manager account, which lets one script loop over several client accounts. A single store with one Google Ads account does not need that and can run every Google Ads script above directly in its own account.

### Score your script setup

Use the checklist below to see which scripts and habits are in place in your account. The heaviest lines are the ones that stop a broken account from spending for days unnoticed.

*An interactive calculator or checker sits here on the web page: https://ecomgraded.com/guides/google-ads-scripts-ecommerce*

## What to do next

Start with the alerts that protect the whole budget, then add product and search term scripts once those are running cleanly.

1. **Install the zero conversion alert today.** Open Tools, then Bulk actions, then Scripts, paste the script, set your email and a window that fits your order volume, preview it and schedule it hourly or daily.
2. **Add the anomaly alert and the broken link checker this week.** Run both in alert mode, send results to a Google Sheet, and fix any broken URLs the first run finds.
3. **Add one Shopping script next month.** Choose the zero impression product report or the product performance labeler, review its first two weeks of output and only then let it feed a custom label.

**Summary:** Every ecommerce account should run Google Ads scripts for zero conversion, anomaly, link and pacing alerts first, then add product and search term scripts, keeping each in alert mode until it has proved accurate.

## Frequently asked questions

### What are Google Ads scripts?

Google Ads scripts are short JavaScript programs that run inside your Google Ads account on a schedule you set, from hourly to monthly. They can read account data, email you alerts, write to Google Sheets and, if you allow it, make changes such as pausing ads. They are free with every account and need no server or extra software.

### Which Google Ads scripts should an ecommerce store run first?

Start with alerts that protect the whole budget: a zero conversion alert, an account anomaly alert and a broken link checker, then a budget pacing check. These only send emails or write to a Google Sheet, so they cannot damage the account. Stores with Shopping campaigns can then add a zero impression product report and a product performance labeler.

### Are AdWords scripts the same as Google Ads scripts?

Yes. Google renamed AdWords to Google Ads in 2018, and the scripts feature kept working under the new name. Many free scripts online were written as AdWords scripts, and some use functions Google has since retired. Before running an older script, read it, run Preview and check the logs for errors or warnings about deprecated features.

### Do I need to know JavaScript to use a Google Ads script?

No, not to run one. Most shared scripts keep their options, such as your email address, a Google Sheet URL and thresholds, in a settings block at the top, and you only edit those lines. You should still read the code before authorizing it, avoid scripts that send data to unknown websites, and run Preview before scheduling.

### Can Google Ads scripts manage Performance Max campaigns?

Only partly. Google Ads scripts can report on Performance Max campaigns and export results such as product, asset group and search category data to a Google Sheet, but they cannot steer them in the detail Search or Standard Shopping allow. Check Google's scripts documentation for which Performance Max objects scripts support as of November 2026.

### Are scripts better than PPC management software?

Neither is better for every store. Google Ads scripts are free and flexible but need someone to install, read and maintain them when Google changes its API. PPC management software packages alerts and reports behind an interface for a subscription. Many accounts use both: software for daily management and a few scripts for store specific checks.

---
Ecom Graded: E-commerce marketing agencies and tools, compared plainly. Method: https://ecomgraded.com/how-we-grade. Editorial policy: https://ecomgraded.com/independence.
