Validates Google Analytics gtag.js implementation and configuration
This checker validates that HTML pages contain proper Google Analytics implementation by checking for the presence of the Google Analytics Global Site Tag (gtag.js) script and its configuration. The checker analyzes the HTML page to look for gtag.js script tags with async attribute, validate Google Analytics measurement ID format (G-XXXXXXXXXX), check for proper script loading sequence and configuration, verify consistency between script src IDs and config IDs, detect legacy Universal Analytics (UA) IDs, and validate script placement in the head section.
This checker validates that HTML pages contain proper Google Analytics implementation by checking for the presence of the Google Analytics Global Site Tag (gtag.js) script and its configuration. It analyzes the HTML page to look for gtag.js script tags with async attribute, validate Google Analytics measurement ID format (G-XXXXXXXXXX), check for proper script loading sequence and configuration, verify consistency between script src IDs and config IDs, detect legacy Universal Analytics (UA) IDs, and validate script placement in the head section.
| Status | Condition | Test Logic |
|---|---|---|
| SUCCESS | Google Analytics properly configured | All required gtag.js scripts found with valid measurement IDs, proper configuration, and no issues |
| WARNING | Google Analytics detected but with configuration issues | Scripts found but with issues like missing async attribute, legacy UA IDs, or script placement problems |
| FAIL | Google Analytics gtag.js script not found | No gtag.js scripts detected on the page |
Missing Analytics Data: Without proper Google Analytics implementation, you lose valuable insights into user behavior, traffic sources, and conversion tracking. Incomplete Tracking: Improper configuration may result in missing or inaccurate data, leading to poor business decisions. SEO Impact: Missing analytics can affect your understanding of which content performs best.
Add this checker to your monitoring setup and start identifying issues on your websites today.