Google Ads scripts automate routine tasks. Last fall, I shared three such scripts that are helpful to me.
- Link Checker scans all account URLs and sends alerts for errors, such as 404 page-not-found or 301 redirects.
- Negative Keyword Conflicts reviews all account keywords to detect if a negative keyword is blocking a positive one. Say I bid on the exact match keyword “free project management solutions,” but I have “free” as a negative keyword. The script will tell me that I’m not showing ads for my positive keyword.
- Overdelivery. Sometimes Google will spend beyond your daily budget. This script pauses individual campaigns if they are over budget and automatically resumes them the next day.
In this post, I’ll address four additional Google Ads scripts that automate tasks and save time. (All Google Ads scripts, incidentally, are written in JavaScript.)
Disapproved Ads Alerts
What it does. No account is perfect. Sometimes Google will disapprove ads. Instead of manually checking each ad group or running a filter to view all disapproved ads, you can set up “Disapproved Ads Alerts” to notify. The script, from developer-consultant Nils Rooijmans, provides an output in Google Sheets with the disapproved ads, including their campaigns and ad groups, and the reason for disapproval. I typically run the script daily.
What to customize. This script requires only two updates.
- SPREADSHEET_URL. Create a Google Sheet and paste its URL.
- EMAIL. Add the email address(es) of whoever should receive the report. Multiple emails are comma-separated.
The script. Copy the “Disapproved Ads Alerts” script.
—
Account Down
What it does. Ads can stop showing for multiple reasons, including account suspension and invalid payment methods. However, accounts can be active with no activity due to disapproved ads, negative keywords that block positive ones, incorrect dayparting settings, and more. It’s critical to know if an account has no activity, whether its impressions, clicks, or cost. Whatever the metric, the “Account Down” script from Optmyzr runs hourly and sends a notification if there has been no activity during a designated number of hours.
What to customize. This script requires three updates.
- EMAIL_ADDRESS_TO_NOTIFY. Add the email address(es) of who receives the notification.
- NUM_HOURS_TO_CHECK. The number of hours of account inactivity before sending a notification. For dayparting, the value should be higher than the chronological number of hours. For example, if you’ve set your ads to be inactive for five hours, this field should be at least six.
- METRIC_TO_CHECK. Impressions is the recommended metric. If the account hasn’t seen any impressions in the designated number of hours, something is likely wrong.
The script. Download the “Account Down” script.
—
Trending Search Terms
What it does. A Google Ads account could have thousands of new search terms every week. Each term has optimization settings, such as:
- Adding negative keywords for irrelevant queries.
- Implementing new keywords.
- Creating new campaigns or ad groups to assign more budget to profitable terms.
- Writing new ads.
The “Trending Search Terms” script, also by Nils Rooijmans, identifies search terms with at least 50 higher or lower impressions. Trending Search Terms provides insights into searchers’ priorities.
What to customize.
- SPREADSHEET_URL. Create a Google Sheet and paste its URL.
- EMAIL_ADDRESSES. Add the email address(es) of who receives the notification.
- EMAIL_SUBJECT. The subject line of the email that contains the report, such as “Search Terms Trends for Account [X].”
The script. Copy the “Trending Search Terms” script.
—
Geo Anomaly Detector
What it does. This daily script, also from Optmyzr, compares the averages of various metrics — clicks, impressions, cost, conversions — across all targeted locations, and then sends alerts for unusual variances. The Google Sheets output looks at the metrics for one day and compares them to the average of a previous, designated number of weeks, which users can customize. The script could report how the metrics for yesterday (a Tuesday, say) compared to the previous eight Tuesdays for a given location. The number of weeks, the metric, and the threshold can be customized in the script.
For example, say Boston typically has 100 conversions on Thursdays, but the most recent Thursday had only 25. The Geo Anomaly Detector script could send a notification of the change. Potential reasons include a lower budget, a new bidding method, and even an external factor, such as a holiday.
What to customize.
- LAST_N_WEEKS. The number of previous weeks to review.
- EMAILS. The email address(es) of who should receive the notification.
- MIN_CLICKS_PER_DAY. The minimum number of daily clicks to trigger an alert.
- INC_PCT. The percentage change in the metric that will trigger a notification.
- INC_ABS. The combined percentage and absolute changes in the metric that will trigger a notification.
The script. Download the “Geo Anomaly Detector” script.
—
See Matthew Umbro’s follow-up: “4 Google Ads Scripts to Free Up Time.”