Skip to content

Integrate project analytics with production analytics service #35

@pofallon

Description

@pofallon

Context

The projects section (spec 010) implements analytics tracking via trackProjectLinkClick() in apps/site-shell/lib/projects/analytics.ts, but this is currently a stub that only logs to console in development mode.

Requirement

NFR-001 from spec 010-projects-section states:

User interactions (page views, outbound link clicks) MUST be tracked via the existing site analytics library; no new tracking infrastructure is required.

Current State

// In production, this could be extended to send to an analytics service
// For now, we use the same structured logging approach as the MDX registry

The function currently:

  • Logs to console in development
  • Does nothing in production

Required Work

  1. Identify or implement the site-wide analytics integration (Google Analytics, Plausible, etc.)
  2. Update trackProjectLinkClick() to send events to the production analytics service
  3. Add page view tracking for /projects and /projects/[slug] routes

Files

  • apps/site-shell/lib/projects/analytics.ts
  • apps/site-shell/components/projects/ProjectDetailClient.tsx

Related

  • Spec: specs/010-projects-section/spec.md (NFR-001)

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech debtTechnical debt to address

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions