PolicyEngine / PolicyEngine/policyengine-app-v2

Integrate PostHog analytics and monitoring across Next apps

Open
#919 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1
Forks
3
Avg merge
1d 50m
Merged PRs (30d)
39

Description

Remaining goal

Complete PostHog analytics and exception monitoring across the Next.js website and calculator-app applications.

Current state

  • The website has first-party /ingest proxy rewrites.
  • The applications do not install or initialize posthog-js.
  • Existing calculator tracking helpers send GA4 events through window.gtag.
  • The requested PostHog event schemas, application providers, and client/server exception capture are absent.

Remaining scope

  • Initialize PostHog through supported Next.js integration points in both applications.
  • Add typed event payloads and instrument the report builder, household builder, calculation lifecycle, report outputs, website calls to action, newsletter signup, research interactions, and country switching.
  • Add useful client, route, and server exception capture.
  • Add equivalent proxying to the calculator application or document why the website proxy is shared.
  • Document required environment variables and verify production builds.

#921 duplicates this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Next.js integration points in the website and calculator-app, including the existing GA4 tracking helpers and website /ingest proxy rewrites. Map the requested analytics events, providers, exception capture, proxying, and environment variables across both applications. Done means both apps are instrumented, production builds are verified, and the required configuration is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, next.js
Domain
analytics, full-stack, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.