Back to Help

Negative Keyword Script

Find and manage negative keywords across your Google Ads account

What This Script Does

Analyzes your search terms to identify negative keyword candidates based on:

  • Low CTR (below 0.25%)
  • High cost without conversions
  • Redundant keywords (already covered by other keywords)
  • Poor performance relative to campaign averages

Setup in 6 Steps

1

Install Script in Google Ads

Navigate to Tools → Bulk Actions → Scripts

Click + New Script and paste the script code

Leave MY_SHEET = '' empty for now

2

Run Once to Generate Sheet

Click Preview or Run

The script creates a Google Sheet automatically and outputs the URL in the logs

3

Get Your Sheet URL from Logs

Check the script logs for your sheet URL

Open the sheet - you'll see tabs: all, settings, total, summary

4

Configure Settings Tab (MCC Only)

If using MCC: Copy desired account IDs from the all tab to the settings tab

Add a runAt time for each account (e.g., "Mon", "Tue", "Wed")

Single account? Skip this step - no configuration needed

5

Add Sheet URL to Script

Back in Google Ads Scripts editor, update line 13:

const MY_SHEET = 'paste-your-sheet-url-here';

Make sure the URL is between single quotes

6

Run Again & Schedule

Click Run - the script will populate your sheet with negative keyword analysis

Set up daily trigger: Triggers → + Add Trigger → Daily 6-7am

The script analyzes the last 7 days of data by default

Understanding Your Data

Summary Tab

Shows aggregate performance and negative keyword recommendations across all campaigns. Focus on search terms with high cost and no conversions first.

Total Tab

Complete list of all search terms with performance metrics. Sort by cost to find expensive poor performers.

Redundant Keywords

Keywords that are already covered by other keywords in your account. These waste budget without adding value.

Set TURN_OFF_REDUNDANT_NEGS = false to see all redundant keywords (warning: may be slow for large accounts)

Common Questions

How often should I run this?

Daily is recommended. The script looks at the last 7 days, so daily runs help you catch poor performers quickly.

What's the difference between single and MCC mode?

The script auto-detects your account type. MCC mode requires you to configure which accounts to analyze in the settings tab. Single account mode works immediately.

Can I change the analysis criteria?

Advanced users can modify the CONFIG object in the script (lines 22-68) to adjust thresholds for CTR, cost, impressions, etc.

Should I automatically add all suggested negatives?

No. Review each suggestion. Some "poor performers" might be early-stage keywords that need more time. Focus on high-spend terms with clear intent mismatches.

Troubleshooting

Script times out: For large accounts, set TURN_OFF_REDUNDANT_NEGS = true (default). This disables the most intensive analysis.
No data in sheet: Make sure MY_SHEET constant has your sheet URL and your campaigns have search data in the last 7 days.
MCC: Only some accounts showing: The script only includes accounts with $500+ spend in the last 30 days. Adjust spendThreshold in CONFIG if needed.

Need Help?

Email support at mike@mikerhodes.com.au