// Pause Low-ROAS Keywords — Google Ads script
var TARGET_ROAS = 3.0; // pause below this
var LOOKBACK_DAYS = 30; // rolling window
var LABEL = 'auto-paused-low-roas';
function main() {
var to = new Date();
var from = new Date(to.getTime() - LOOKBACK_DAYS * 864e5);
var range = Utilities.formatDate(from, AdsApp.currentAccount().getTimeZone(), 'yyyyMMdd') +
',' + Utilities.formatDate(to, AdsApp.currentAccount().getTimeZone(), 'yyyyMMdd');
var kws = AdsApp.keywords()
.withCondition('Status = ENABLED')
.forDateRange(range)
.withCondition('Conversions > 0')
.get();
while (kws.hasNext()) {
var kw = kws.next();
var stats = kw.getStatsFor(range);
var roas = stats.getConversionValue() / Math.max(stats.getCost(), 0.01);
if (roas < TARGET_ROAS) {
kw.pause();
kw.applyLabel(LABEL);
}
}
}
Runs daily, checks each enabled keyword’s ROAS over a lookback window, pauses the ones under your target, labels them, and appends a row to a Google Sheet so you have an audit trail.
Setup
In Google Ads, go to Tools > Bulk actions > Scripts and create a new script.
Paste the code, set TARGET_ROAS and LOOKBACK_DAYS, and authorize.
Preview, then schedule it to run Daily.
Parameters
Name
Description
Default
TARGET_ROAS
Pause keywords below this ROAS
3.0
LOOKBACK_DAYS
Rolling window in days
30
LABEL
Label applied to paused keywords
auto-paused-low-roas
Requirements
Google Ads account with conversion tracking + value. A Google Sheet for logging (optional).