Google Ads Scripts & GTM Recipes
AdsApp scripts for Google Ads and Custom HTML tags for GTM. Configure the code on the page, then copy the whole thing.
Konami code easter egg for GTM
A Custom HTML tag that watches for ↑ ↑ ↓ ↓ ← → ← → B A, a five-tap on the logo, or a swipe sequence, then runs one of eight payloads — from a rickroll to a page that credits every conversion to whatever you clicked last — and pushes the trigger to the dataLayer.
On-page debug HUD
Ctrl+Shift+G opens a panel over the page showing the last five dataLayer entries, the UTM and click IDs in the URL, and whether fbq and gtag are defined. Useful when you cannot open GTM preview on a client site.
Broken landing page checker
Requests the final URL of every enabled ad, sitelink and keyword, then logs any 4xx, 5xx or out-of-stock response to a Google Sheet and emails the summary. Optionally pauses the ads it finds.
N-gram analysis of search terms
Splits the search terms report into one-, two- and three-word tokens and sums cost and conversions across each. Words that spend without converting show up even when no single query does.
Display placement cleaner
Reads the placement report for Display and YouTube, flags app packages and domains that match the gaming, kids and made-for-advertising patterns you configure, and adds them to the account negative placement list.
Budget pacing alerts
Projects month-end spend from month-to-date totals and the recent daily rate, then emails you when the projection drifts past your tolerance or when a campaign stops spending altogether.
Confetti on conversion
Draws a short canvas confetti burst when your thank-you trigger fires, shows a discount badge for five seconds, and pushes growth_milestone_unlocked to the dataLayer. Around 65 lines, no library.
Safari ITP cookie restore
Copies _ga and _fbp into localStorage and writes them back when a Safari visitor returns after the 7-day ITP window has expired the cookies.
Quality Score history logger
Google Ads shows Quality Score only as it is today. This appends a daily row per keyword — score, expected CTR, ad relevance, landing page experience — so you can see what a change did.
Z-score anomaly detection (Python CLI)
A command from the google-ads-agents repo. Takes a 14-day rolling mean and standard deviation for spend, CTR, CPC and conversions, and flags days more than two standard deviations out.
