Keywords vs Search Terms
Compares search terms against your ad group keywords using fuzzy matching to flag mismatches for review or exclusion, with an optional fully-automated negation mode.
by Charles Bannister & Gabriele Benedetti (shabba.io)·shabba.io/google_ads_scripts/keywords-vs-search-terms
Overview
For each search term, computes a fuzzy-match similarity against the keywords in the ad group that triggered it; terms below a similarity threshold are flagged as potential negatives. Runs in review mode (writes to a sheet and emails) or full-automate mode (adds negatives directly). Use it to catch queries that only loosely relate to your keywords.
Setup
- 1Copy the Google Sheet template linked on the source page.
- 2In Google Ads, go to Tools → Bulk Actions → Scripts.
- 3Click + to create a new script and paste the code below.
- 4Set SPREADSHEET_URL. Tune LOOKBACK_DAYS, FUZZY_MATCH_THRESHOLD and the MIN_* filters. Add EMAIL_RECIPIENTS.
- 5Leave FULL_AUTOMATE_MODE false first; preview, review the Output tab, then optionally enable it and schedule hourly.
Configuration Variables
| Variable | Default |
|---|---|
SPREADSHEET_URL | PASTE_YOUR_SPREADSHEET_URL_HERE |
LOOKBACK_DAYS | 30 |
FUZZY_MATCH_THRESHOLD | 70 |
FULL_AUTOMATE_MODE | false |
MIN_CLICKS | 0 |
Expected Output
Analyzed 480 search terms over 30 days. Flagged 37 low-similarity terms (threshold 70) — written to Output tab. Report emailed to your recipients (or negatives added in full-automate mode).
Notes
Bundles the author's exclusion-logic helper into a single paste. Ships with a built-in test suite (RUN_TEST_SUITE) for validating the fuzzy matcher. Co-authored by Gabriele Benedetti. Start in review mode before enabling full automation.