Script Auto Pause Non Converting Keywords: Step-by-Step

Learn how to deploy a script to auto-pause non converting keywords after $175 spend with zero sales. Cut wasted spend, review code, and safeguard your budget.

By AdTurbo Team · 2026-11-27

Every dollar spent on a search keyword that never converts is capital stolen from your highest-performing campaigns. In paid search, non-converting keywords—frequently referred to as "bleeders"—quietly drain budgets over days, weeks, and quarters. While manual optimization routines help, they inevitably suffer from human delay. By the time you notice an ad group bleeding budget inside the Google Ads UI, that specific term may have already absorbed hundreds of dollars without generating a single transaction.

Building and deploying a custom script to auto-pause non converting keywords prevents this exact scenario. By setting an automated rule—such as instantly pausing any keyword that crosses $175 in cost with zero sales—you institute an immutable financial circuit breaker across your account.

In this complete architectural guide, we will walk through the logic, code, installation steps, and governance models required to run a custom Google Ads script for budget protection that executes cleanly and safeguards your profitability.

---

Why Manual Keyword Triage Fails at Scale

Most account managers review performance on a weekly or bi-weekly cycle. Between reviews, volatile search volumes or shifts in bidding behavior can drive dozens of unproductive clicks to an unproven search phrase.

The Sneaky Nature of Budget Bleeders

High-cost, zero-conversion keywords rarely announce themselves immediately. A keyword with an average cost-per-click (CPC) of $3.50 might accumulate 50 clicks over three weeks without raising immediate alarm. However, once that query hits 50 clicks without a sale, you have spent $175 on an unviable hypothesis.

Multiply that pattern across twenty or thirty ad groups in an expanding e-commerce or B2B account, and you have thousands of dollars in wasted spend that could have been allocated to your target cost-per-acquisition (CPA) campaigns. If your team manages accounts manually, reviewing a comprehensive PPC audit checklist will often uncover significant historical leakage attributable entirely to unchecked zero-conversion keywords.

Conversion Lag and False Positives

Automating keyword pauses is not without nuance. The primary reason advertisers hesitate to deploy cut-off rules is conversion lag: the delay between a user's initial ad click and their final purchase. In high-ticket B2B sales or complex e-commerce funnels, the customer journey may span 7 to 30 days.

If you pause a keyword the exact moment it hits $175 without checking your attribution window, you might pause an asset that drove an assisted conversion or an offline deal scheduled to close next Tuesday. A robust script must therefore account for lookback windows, date ranges, and attribution realities rather than acting blindly on the last 24 hours of data.

---

Defining the $175 Spend Rule: Math and Margin Thresholds

Why select $175 as a threshold? While the script code can be configured to any numerical variable, your spend limit should always be derived from unit economics rather than arbitrary guesswork.

| Business Model | Average Order Value (AOV) | Target CPA | Recommended Spend Cut-Off Limit |

| :--- | :--- | :--- | :--- |

| Direct-to-Consumer Apparel | $65 | $22 | $45 – $65 (1x to 2x Target CPA) |

| Mid-Tier E-Commerce / Electronics | $180 | $55 | $110 – $165 (2x to 3x Target CPA) |

| B2B SaaS (Self-Serve) | $350 | $120 | $175 – $240 (1.5x to 2x Target CPA) |

| High-Ticket Lead Gen | $1,200+ | $300 | $300 – $450 (1x to 1.5x Target CPA) |

The 2x–3x Target CPA Baseline

A universal best practice in performance advertising is setting an experimental spend ceiling at 2 to 3 times your target CPA or break-even CPA. If your business can profitably acquire a customer at $60, a keyword that spends $175 (nearly 3x your target CPA) with zero conversions possesses a statistical probability of profitability nearing zero.

To calculate your cut-off threshold:

1. Determine your break-even CPA: Break-Even CPA = Product Margin ($) per Sale.

2. Choose your tolerance multiplier based on risk appetite (standard is 2.5x).

3. Set your threshold: Cut-Off = Break-Even CPA 2.5.

If your break-even CPA is $70, setting the script threshold to $175 ensures you terminate non-performers before they erode the gross margins earned by your profitable campaigns. If you find your entire account baseline is running into profitability roadblocks, take time to explore why is Google Ads so expensive to balance bids, landing page quality, and baseline search intent.

---

The Complete Code: Google Ads Script to Pause Zero-Sales Keywords

Below is the production-ready script written for the modern Google Ads Scripts environment (which natively supports ECMAScript 6+ and the Google Ads API architecture). This script examines enabled keywords, evaluates spend over a designated lookback window, checks for zero conversions, applies a pause status, logs the output, and labels the modified entities for complete visibility.

javascript

/

• Google Ads Script: Auto-Pause Non-Converting Keywords After Spend Threshold

• Description: Pauses enabled keywords that have accrued = $175 in spend with 0 conversions.

• Applies a tracking label and sends an email summary.

/

const CONFIG = {

SPENDTHRESHOLD: 175.00, // Spend limit before pausing

DATERANGE: 'LAST30DAYS', // Lookback window (e.g., 'LAST30DAYS', 'ALLTIME')

LABELNAME: 'Paused by Script: No Sales', // Label to apply to paused keywords

EMAILNOTIFICATION: '[email protected]', // Recipient for audit report

DRYRUN: false // Set to true to test without making actual changes

};

function main() {

ensureLabelExists(CONFIG.LABELNAME);

const query =

SELECT

adgroupcriterion.resourcename,

adgroupcriterion.keyword.text,

adgroupcriterion.keyword.matchtype,

campaign.name,

adgroup.name,

metrics.costmicros,

metrics.conversions

FROM keywordview

WHERE

adgroupcriterion.status = 'ENABLED'

AND campaign.status = 'ENABLED'

AND adgroup.status = 'ENABLED'

AND metrics.costmicros = ${CONFIG.SPENDTHRESHOLD 1000000}

AND metrics.conversions = 0

AND segments.date DURING ${CONFIG.DATERANGE}

;

const report = AdsApp.search(query);

const pausedKeywords = [];

while (report.hasNext()) {

const row = report.next();

const keywordText = row.adGroupCriterion.keyword.text;

const matchType = row.adGroupCriterion.keyword.matchType;

const campaignName = row.campaign.name;

const adGroupName = row.adGroup.name;

const cost = (row.metrics.costMicros / 1000000).toFixed(2);

const conversions = row.metrics.conversions;

Logger.log(Found candidate: "${keywordText}" (${matchType}) in [${campaignName} ${adGroupName}] | Spend: ${cost} | Conversions: ${conversions});

if (!CONFIG.DRYRUN) {

// Select the live keyword entity to apply changes

const keywordIterator = AdsApp.keywords()

.withCondition(adgroupcriterion.resourcename = '${row.adGroupCriterion.resourceName}')

.get();

if (keywordIterator.hasNext()) {

const keywordEntity = keywordIterator.next();

keywordEntity.pause();

keywordEntity.applyLabel(CONFIG.LABELNAME);

Logger.log(- Successfully PAUSED and LABELED keyword: "${keywordText}");

}

} else {

Logger.log([DRY RUN MODE] Keyword "${keywordText}" would be paused.);

}

pausedKeywords.push({

keyword: keywordText,

matchType: matchType,

campaign: campaignName,

adGroup: adGroupName,

cost: cost

});

}

sendSummaryEmail(pausedKeywords);

}

function ensureLabelExists(labelName) {

const labelIterator = AdsApp.labels().withCondition(name = '${labelName}').get();

if (!labelIterator.hasNext() && !CONFIG.DRYRUN) {

AdsApp.createLabel(labelName, 'Created automatically by automated budget protection script', 'E53E3E');

Logger.log(Created label: ${labelName});

}

}

function sendSummaryEmail(items) {

if (items.length === 0 || !CONFIG.EMAILNOTIFICATION) {

Logger.log('No keywords paused. No email notification sent.');

return;

}

const subject = [Google Ads Alert] ${items.length} Non-Converting Keywords Paused;

let body = The auto-pause script ran and identified ${items.length} keyword(s) with = ${CONFIG.SPENDTHRESHOLD} spend and 0 conversions (${CONFIG.DATERANGE}):\n\n;

items.forEach((item, index) = {

body += ${index + 1}. "${item.keyword}" (${item.matchType})\n;

body += Campaign: ${item.campaign}\n;

body += Ad Group: ${item.adGroup}\n;

body += Spend: ${item.cost}\n\n;

});

if (CONFIG.DRYRUN) {

body = ' DRY RUN ONLY - NO MUTATIONS APPLIED \n\n' + body;

}

MailApp.sendEmail(CONFIG.EMAILNOTIFICATION, subject, body);

Logger.log(Summary email dispatched to ${CONFIG.EMAILNOTIFICATION});

}

---

Step-by-Step Installation and Testing Guide

Deploying code directly to a live production Google Ads account requires caution. Follow these operational steps to ensure safe execution.

Step 1: Open the Scripts Workspace

1. Sign in to your Google Ads account.

2. In the top navigation bar, click on Tools and Settings (the wrench icon) or navigate to the modern sidebar menu.

3. Under Bulk Actions, select Scripts.

4. Click the blue "+" button to create a new script project.

Step 2: Paste and Authorize the Code

1. Clear any default boilerplate code present inside the code editor.

2. Copy the complete JavaScript snippet above and paste it directly into the console.

3. Rename your script at the top left from "Untitled Script" to Auto-Pause Wasted Spend Keywords ($175).

4. Click Authorize at the bottom right. A Google OAuth modal will appear requesting permissions to access your campaigns, modify entities, and send emails via MailApp. Approve these permissions using the primary email attached to the Google Ads account.

Step 3: Run in Preview / Dry Run Mode

Never schedule a script without running a preview first:

1. Ensure DRYRUN: true is set in the CONFIG object.

2. Click Preview at the bottom of the interface.

3. Check the Logs tab below the editor. The console will print each keyword that exceeded $175 with zero conversions and confirm the action it would have taken.

4. Verify that you are not accidentally flagging newly created keywords that simply lack volume, or core brand terms that might be experiencing a temporary tracking outage.

Step 4: Schedule Automated Execution

1. Once validated, set DRYRUN: false and click Save.

2. Return to the Scripts dashboard.

3. Locate your script row and click under the Frequency column.

4. Select Daily and choose an early morning execution time (e.g., 3:00 AM or 4:00 AM in your account’s operating time zone). Daily execution ensures that runaway spend is caught within 24 hours of breaching the $175 threshold.

---

Edge Cases, Guardrails, and Exclusion Rules

Applying a crude sledgehammer to an account can backfire if your script lacks contextual filters. When writing a custom Google Ads script for budget protection, you must account for these edge cases.

Protecting Brand Terms

Branded search keywords typically convert at 5x to 10x the rate of generic searches. If your brand campaign ever experiences an attribution glitch, a tracking tag failure, or a short-lived drop in inventory, you do not want an automated script pausing your brand name.

To prevent brand keywords from pausing, update your GAQL query in the script to filter out brand campaigns by naming convention:

sql

AND campaign.name DOESNOTCONTAINIGNORECASE 'Brand'

Factoring in Conversion Lag with Lookback Offsets

If your sales funnel takes 14 days for a click to convert into a recorded sale, checking performance over the last 30 consecutive days means the clicks from yesterday and the day before have not had time to mature.

Instead of evaluating raw data up to today, sophisticated accounts exclude the most recent 3–7 days from the calculation window. While the Google Ads Scripts API provides preset date ranges like LAST30DAYS, you can pass custom dynamic date ranges using JavaScript date formatting: calculate Today - 37 days to Today - 7 days to cleanly evaluate matured traffic cohorts.

Tracking Tags and Conversion Attribution Disconnects

If your website's primary conversion tag drops off due to a faulty site deployment, all keywords across your entire account will show 0 conversions. If your script runs during a sitewide conversion outage, it could systematically pause every active keyword that crosses $175.

To safeguard against this catastrophe, integrate an account-level health check: if the total account-level conversions over the past 48 hours equal zero, abort the script run and send an emergency alert email rather than pausing individual keywords.

---

Pausing Keywords vs. Adding Negative Keywords

Advertisers frequently debate whether to pause an underperforming keyword or add the phrase as a negative keyword. Both strategies prevent wasted budget, but they execute at different structural layers.

+-------------------------------------------------------------+

| Search Campaign Flow |

+-------------------------------------------------------------+

|

+----------------------+----------------------+

| |

v v

[ Target Keyword Bleeder ], [ Search Term Bleeder ]

Action: Pause Keyword Action: Add Negative Keyword

Impact: Stops exact targeting Impact: Blocks raw search term

Result: Preserves historical QS Result: Cleans up broad match traffic

The Functional Distinction

• Pausing a Keyword: Disables the specific keyword entity (and its specific match type) that you intentionally created in your ad group. Pausing stops that keyword from entering auctions, but leaves the underlying ad group and campaign intact.

• Adding a Negative Keyword: Prevents your ads from serving on specific search queries typed by users, regardless of what keyword matched it. This is essential when running broad match or phrase match keywords that pull in irrelevancies.

If a specific phrase match keyword like "enterprise cloud storage pricing" spends $175 with zero conversions, pausing the keyword itself solves the problem. But if you are targeting +cloud +storage on broad match, and users searching for free cloud storage linux download are burning your budget, pausing the root keyword turns off your good traffic alongside the bad. In that scenario, you should mine the queries using our detailed guide on the search terms report and apply exact negative keywords.

If you find yourself repeatedly building manual negative lists to block unprofitable query patterns, review our compiled list of negative keywords examples to add universal account-level exclusions before spending begins.

---

Beyond Scripts: When to Upgrade to Dedicated AI Automation

While a Google Ads script provides an exceptional entry point for programmatic account defense, custom JavaScript workflows come with distinct operational limitations as accounts scale.

Maintenance Overhead and API Versioning

Google periodically updates its Google Ads API, sunsetting older endpoints and deprecating query fields. Scripts written today will eventually fail when syntax requirements change. Teams managing multiple accounts or complex ad architectures often find maintaining custom code, updating email alerts, and fixing broken API calls unviable over the long term.

The Binary Nature of Scripts

A script is strictly binary: if spend = 175 AND conversions == 0 - pause. It lacks the holistic contextual awareness to ask critical contextual questions:

• Has this keyword generated 8 high-intent micro-conversions (e.g., checkout starts, PDF downloads) despite lacking a final sale?

• Is the ad copy underperforming, meaning a revised headline would unlock conversions before we kill the keyword?

• Is the landing page conversion rate dropping site-wide due to technical errors?

Modern engineering solves this via specialized Google Ads automation engines. Platforms like AdTurbo operate as autonomous agents that analyze continuous multi-signal data. Rather than relying solely on hardcoded spending caps, AdTurbo continuously audits bid prices, real-time search term drift, landing page status, and micro-conversion indicators to trim unprofitable ad spend proactively before it ever hits a $175 threshold.

For growing brands looking to graduate past maintaining code snippets, pairing budget scripts with dedicated PPC management software offers full-funnel security without ongoing technical maintenance.

---

Auditing the Impact of Your Auto-Pause Automations

Installing the script is only half the process; you must routinely evaluate the outcomes of automated actions to verify positive campaign impact.

Reviewing the Applied Labels

Because the script applies the Paused by Script: No Sales label to every entity it touches, reviewing script decisions in the Google Ads UI takes seconds:

1. Navigate to Keywords.

2. Filter by Label contains Paused by Script: No Sales.

3. Add columns for Cost, Impressions, Clicks, and Conversions.

4. Check the performance metrics across all paused keywords over the last 90 days.

Calculate the total spend consumed by these terms prior to pausing. If the script paused 14 keywords that each averaged $180 in spend before cutoff, the script successfully capped budget bleed at $2,520. That capital can now be redirected into high-converting exact match ad groups or winning asset groups.

Routine Manual Calibration

Incorporate this script audit into your standard operational rhythm. As detailed in our Google Ads optimization checklist, reviewing automated rules every month ensures your thresholds match seasonal changes, shifts in margin, and catalog pricing updates. If your average order value increases by 40% next quarter, raising your spend cut-off limit from $175 to $225 ensures you give campaigns sufficient room to convert.

---

Related Guides

• How to Use the Google Ads Search Terms Report to Cut Wasted Spend

• PPC Audit Checklist: 12 Steps to Fix a Leaking Google Ads Account

• Google Ads Optimization Checklist: 15 Things to Check Every Week

---

Frequently Asked Questions

What happens to a paused keyword's historical Quality Score?

Pausing a keyword preserves all historical metrics, including Quality Score components, click-through rate, and historical impression volume. If you decide to unpause the keyword later after optimizing your landing page or adjusting your pricing, the keyword resumes with its historical data intact.

Can this script be modified to pause Performance Max campaigns or product groups?

This specific script targets standard search keyword entities using the keywordview resource. For Performance Max or Shopping campaigns, you would need to adjust the query to target shoppingperformanceview or asset group resources, as standard keywords do not exist in Performance Max.

How often should the zero-conversion auto-pause script run?

For accounts spending between $5,000 and $50,000 per month, running the script once daily during off-peak morning hours is optimal. High-volume enterprise accounts spending thousands per day may benefit from running the script every 6 to 12 hours, while accounts with modest budgets can run it once per week.