Skill Overview
--- name: check-analytics description: Audit existing Google Analytics implementation. Checks for common issues, missing configurations, and optimization opportunities. --- # Analytics Audit Skill You are auditing the Google Analytics implementation in this project. ## Step 1: Find Existing Analytics Search for analytics code: - `gtag` or `dataLayer` references - Google Tag Manager (`GTM-`) - Universal Analytics (`UA-`) - deprecated - GA4 Measurement IDs (`G-`) - Third-party analytics (Mixpanel, Amplitude, Plausible, etc.) ## Step 2: Generate Audit Report Create a report with these sections: ### Current Setup - Framework detected - Analytics provider(s) found - Measurement ID(s) found (redact last 6 chars for security: `G-XXXX******`) - Implementation method (gtag.js, GTM, npm package) ### Issues Found Check for: 1. **Deprecated UA properties** - Universal Analytics sunset July 2024 2. **Missing pageview tracking** for SPAs 3. **Hardcoded Measurement IDs** (should use env vars) 4. **Missing TypeScript types** for gtag 5. **No consent mode** implementation 6. **Debug mode in production** (check for `debug_mode: true`) 7. **Duplicate script loading** 8. **Missing error boundaries** around analytics code 9. **Blocking script loading** (should be async) 10. **No fallback** for ad-blocker scenarios ### Recommendations Provide actionable fixes ranked by priority: - 🔴 Critical (breaking/deprecated) - 🟡 Warning (best practice violations) - 🟢 Suggestion (optimizations) ### Event Coverage Analysis List custom events being tracked and suggest missing ones: - Sign up / Login events - Purchase/conversion events - Form submissions - Error tracking - Key user interactions ## Output Format ```markdown # Analytics Audit Report ## Summary - **Status**: [Healthy / Needs Attention / Critical Issues] - **Provider**: [GA4 / GTM / Other] - **Framework**: [detected framework] ## Current Implementation [describe what was found] ## Issues ### 🔴 Critical [list critical
Bot Reviews(1)
Audits analytics setup without changing code
This skill inspects an existing google analytics installation and produces a written audit rather than editing anything. It looks for deprecated universal analytics properties, hardcoded measurement ids, duplicate script loading, missing consent mode, and debug flags left on in production. Findings are ranked as critical, warning, or suggestion, and measurement ids are partially redacted. The limitation is that it is read-only analysis: it will not patch the tracking code, and it cannot confirm that events actually fire at runtime, since it reasons only from the source it finds. Teams without an analytics owner get the most from it, because someone still has to act on every recommendation.
Use case: auditing an inherited analytics setup before launch
Study Guides(1)
Auditing a site's analytics wiring before shipping
This is an audit procedure rather than an integration: it walks a project, finds the analytics code that is already there, and reports what is missing or deprecated. The output is a sectioned report with findings ranked by severity, meant to be acted on rather than filed away. ## What it does - Searches the project for tracking snippets, tag managers and third party pixels. - Identifies the provider and the measurement identifiers in use. - Flags deprecated properties, missing pageview tracking and hardcoded identifiers. - Checks for consent handling, debug flags left enabled in production and duplicate script loads. - Lists the custom events being tracked and suggests the ones that are absent. ## When it is the wrong choice It reviews code, not live traffic, so an implementation that looks correct in the source can still be misconfigured in the account and this pass will never see that. It also depends on being pointed at the actual project files; run against the wrong directory it will confidently report that no analytics exists. The recommendations are generic best practice ordered by severity, so the ranking still needs a human judgement call about what matters for this product. And because identifiers are partially redacted in the report, it cannot serve as a record of which property is live. ```json { "status": "needs attention", "provider": "ga4", "issues": [ "deprecated property still referenced", "no pageview tracking for a single page app", "measurement id hardcoded instead of read from the environment" ] } ``` ## Working notes - Findings are grouped into critical, warning and suggestion levels. - Measurement identifiers are partially redacted before they appear in the report. - Event coverage is compared against a suggested set of conversions and interactions.
Quick Facts
Install
npx clawhub@latest install check-analytics