DKI & Customizer Audit
Finds the silently broken ad insertions: countdowns pointing at past dates, keyword-insertion defaults that are empty or too long, and malformed braces that serve literally as ad text.
by Dmytro Tonkikh·chiliad.io
Overview
Dynamic Keyword Insertion and countdown customizers are powerful right up until they quietly break. This audit scans every enabled RSA's headlines and descriptions for three failure modes: {COUNTDOWN(...)} pointing at a date that already passed (the asset silently stops serving), {KeyWord:default} with an empty default or one long enough that real keywords push the combined text over the 30-character headline limit, and unbalanced braces that make the insertion syntax serve literally as ad text.
Setup
- 1Open your Google Ads account and go to Tools → Bulk Actions → Scripts.
- 2Click the + button to create a new script and paste the code below.
- 3Adjust DKI_DEFAULT_MAX if your headline patterns leave more or less room.
- 4Set EMAIL_ADDRESS to receive the report; leave blank for logs only.
- 5Preview once to verify, then schedule weekly.
Configuration Variables
| Variable | Default |
|---|---|
DKI_DEFAULT_MAX | 20 |
EMAIL_ADDRESS | (empty) |
Expected Output
=== DKI & Customizer Audit ===
RSAs checked: 46 Using insertions: 12 With issues: 2
Sneakers > Promotions (ad 712345678903)
- PAST COUNTDOWN (2026/06/30) in headline "Sale ends in {COUNTDOWN("2026/06/30 23:59:59")}"
Brand — Exact > Core (ad 712345678901)
- LONG DKI DEFAULT (28 chars: "Premium Running Shoes Online") in headline "Buy {KeyWord:Premium Running Shoes Online}"
Email sent to you@example.comNotes
All DKI capitalization variants ({keyword:}, {Keyword:}, {KeyWord:}) are valid Google syntax and audited alike. GLOBAL_COUNTDOWN and ad customizer attributes ({CUSTOMIZER...}) are only checked for brace balance, not semantics. A flagged past countdown in a still-relevant ad usually means: update the date or remove the asset.