Trending Search Terms
Builds a Google Sheets report of search terms trending up or down — last week vs the week before AND last week vs the same week last year (seasonality-proof).
by Nils Rooijmans·nilsrooijmans.com/google-ads-script-trending-search-terms
Overview
Spotting demand shifts early is free money: rising queries deserve budget and ad copy, falling ones explain 'mysterious' performance drops. This script compares search term impressions across two windows — last week vs the week before (momentum) and last week vs the same week last year (seasonality-adjusted) — and writes both trend lists to separate sheets, with an email notification.
Setup
- 1Create a new blank Google Sheet and copy its URL.
- 2Open your Google Ads account and go to Tools → Bulk Actions → Scripts.
- 3Click the + button to create a new script and paste the code below.
- 4Set SPREADSHEET_URL, EMAIL_ADDRESSES and the account name in EMAIL_SUBJECT, preview, then schedule weekly (Mondays work best — full weeks on both sides).
Configuration Variables
| Variable | Default |
|---|---|
SPREADSHEET_URL | (required) |
EMAIL_ADDRESSES | (required) |
IMPRESSIONS_MIN | 10 |
IMPRESSIONS_MIN_ABS_DIFFERENCE | 50 |
IMPRESSIONS_MIN_REL_DIFFERENCE |
Expected Output
Two sheets: 'WoW trends' (last week vs week before) and 'YoY trends' (vs same week last year), each listing search terms with impressions in both periods and the absolute + relative change.
Notes
The year-over-year sheet needs a year of search term history in the account. Lightly updated by chiliad for the current AdsApp runtime. A high-performance MCC version is available from the author.