Tracking Template Audit
Audits the URL plumbing: tracking templates missing {lpurl} (clicks never reach your site), ads still using http:// final URLs, and inconsistent template coverage.
by Dmytro Tonkikh·chiliad.io
Overview
Broken URL setups don't fail loudly — they fail in your analytics. Tracking Template Audit checks every enabled campaign's tracking template for a landing-page insertion ({lpurl} or a variant; without one, clicks land on the tracking URL and never reach your site), scans every enabled ad for final URLs still on http:// (a redirect at best, a policy problem at worst), and can optionally flag campaigns with no tracking template while others have one — the inconsistent-measurement smell.
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.
- 3Set FLAG_MISSING_TEMPLATES = true if your setup expects a template on every campaign.
- 4Set EMAIL_ADDRESS to receive the report; leave blank for logs only.
- 5Preview once to verify, then schedule weekly.
Configuration Variables
| Variable | Default |
|---|---|
FLAG_MISSING_TEMPLATES | false |
EMAIL_ADDRESS | (empty) |
Expected Output
=== Tracking Template Audit ===
Campaigns: 24 (18 with campaign-level template) Ads checked: 132
--- BROKEN TEMPLATES (no {lpurl} insertion) ---
Competitor — Phrase template: https://track.example.com/click?id=123
--- INSECURE http:// FINAL URLS ---
Brand — Exact > Legacy (ad 712345678901): http://example.com/old-page
Email sent to you@example.comNotes
Templates at account or ad-group level are not audited — campaign level covers the common failure mode. If you rely purely on Google's auto-tagging (gclid) with no templates at all, the missing-template check is irrelevant; leave FLAG_MISSING_TEMPLATES off.