Skip to main content

Analytics

By Amr

Analytics integration options for the Zer0-Mistakes theme including PostHog, Google Analytics, and Tag Manager.

Estimated reading time: 1 minutes

Analytics

The Zer0-Mistakes theme supports multiple analytics platforms with privacy-first configurations.

Available Integrations

Platform Privacy Focus Free Tier
PostHog Yes (self-hostable) 1M events/mo
Google Analytics Limited 10M hits/mo
Google Tag Manager Varies Unlimited

Quick Comparison

  • Privacy: GDPR compliant, self-hostable
  • Features: Analytics, session recording, feature flags
  • Best for: Privacy-conscious sites

Google Analytics

  • Privacy: Data sent to Google
  • Features: Comprehensive analytics
  • Best for: Marketing insights

Google Tag Manager

  • Privacy: Depends on tags used
  • Features: Centralized tag management
  • Best for: Marketing teams

Configuration Overview

PostHog

# _config.yml
posthog:
  enabled: true
  api_key: 'phc_YOUR_KEY'
  api_host: 'https://us.i.posthog.com'

Google Analytics

# _config.yml
google_analytics:
  tracking_id: 'G-XXXXXXXXXX'

Google Tag Manager

# _config.yml
google_tag_manager:
  container_id: 'GTM-XXXXXXX'

Environment-Aware Loading

All analytics only load in production:

{% if jekyll.environment == 'production' %}
  {% include analytics/posthog.html %}
{% endif %}

Privacy Compliance

See Cookie Consent for GDPR/CCPA compliant consent management.