Skip to content

[Phase 3] Add analytics infrastructure (optional) #102

@afucher

Description

@afucher

Implement analytics tracking via Plausible (or GoatCounter as fallback) for understanding user behavior and documentation gaps.

Deliverable

Full analytics integration ready to be enabled on command. Users can toggle analytics on/off with a single config change.

Acceptance Criteria

  • docs-plan-analytics.md reviewed and approved as the source of truth

  • Plausible account created and astrodraw.github.io registered as a site

  • Head injection configured in astro.config.mjs (commented out by default):

    • Script tag with data-domain='astrodraw.github.io' and Plausible script src
    • Can be uncommented to enable tracking immediately
  • Optional: Zero-result search tracking script created:

    • website/public/track-search.js with Pagefind observer
    • Scaffolded but not active (requires uncomment in head config)
    • Documents how Plausible custom events work
  • Privacy/GDPR documentation:

    • PRIVACY.md created briefly stating no cookies, no consent banner needed
    • Links to Plausible's privacy policy
    • Added to footer
  • GoatCounter as fallback documented:

    • If Plausible plan changes or budget issues arise, exact steps to switch provided
    • Single config line change needed
  • Rollout plan documented:

    • Who enables analytics and when (decision point: after public announcement)
    • How to check Plausible dashboard
    • How to interpret zero-result searches
  • All code merged but analytics disabled by default (no impact on site until explicitly enabled)

Related Plan Section

docs-plan-analytics.md (full analytics plan)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions