bootstrap-google-analytics
OfficialEnable GA4 tracking in your Phoenix app
Marketing & Sales#csp#phoenix#ga4#gtag.js#google analytics#production configuration#analytics instrumentation
Authoragoodway
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Adding Google Analytics 4 to a Phoenix application often requires careful, environment-specific wiring so tracking is disabled in dev/test and enabled only in production.
Core Features & Use Cases
- Phoenix GA4 bootstrapping: Sets up GA4 with gtag.js by injecting scripts into the root layout and wiring configuration into config.exs and runtime.exs.
- Safe environment behavior: Keeps analytics disabled by default in dev/test while enabling it in production via the GOOGLE_ANALYTICS_MEASUREMENT_ID environment variable.
- Configuration discovery and updates: Detects an existing root layout, existing GA config, and existing gtag markup before applying changes, and updates .env.sample for the measurement id.
Quick Start
Install and activate this skill in your Phoenix 1.8 project, then follow the prompts to bootstrap GA4 and ensure production enables tracking via GOOGLE_ANALYTICS_MEASUREMENT_ID.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: bootstrap-google-analytics Download link: https://github.com/agoodway/GoodSkills/archive/main.zip#bootstrap-google-analytics Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.