Description
Add Google Analytics tracking to the Jekyll documentation site to monitor visitor traffic, popular pages, and user behavior.
Implementation
Jekyll has built-in support for Google Analytics via configuration. Add to docs/_config.yml:
# Google Analytics
google_analytics: UA-XXXXXXXXX-X # Replace with actual GA tracking ID
Or for Google Analytics 4:
# Google Analytics 4
google_analytics:
measurement_id: G-XXXXXXXXXX # Replace with actual GA4 measurement ID
Steps
- Create Google Analytics account and property for core.msr.lavr.site
- Get tracking ID (UA-X or G-X measurement ID)
- Add configuration to
docs/_config.yml
- Build and verify tracking code appears in generated HTML
- Test with Google Tag Assistant or GA real-time view
- Update documentation-local-setup.md if needed
Benefits
- Track visitor metrics (page views, sessions, users)
- Identify most popular documentation pages
- Understand user navigation patterns
- Measure documentation effectiveness
- Make data-driven decisions for documentation improvements
References
Description
Add Google Analytics tracking to the Jekyll documentation site to monitor visitor traffic, popular pages, and user behavior.
Implementation
Jekyll has built-in support for Google Analytics via configuration. Add to
docs/_config.yml:Or for Google Analytics 4:
Steps
docs/_config.ymlBenefits
References