Skip to content

Track website visits, filters and downloads in PostHog - #75

Merged
Jingxi-Polymaker merged 1 commit into
mainfrom
feat/posthog-website-usage
Sep 7, 2026
Merged

Track website visits, filters and downloads in PostHog#75
Jingxi-Polymaker merged 1 commit into
mainfrom
feat/posthog-website-usage

Conversation

@Jingxi-Polymaker

Copy link
Copy Markdown
Collaborator

The website had Google Analytics download tracking and a separate PostHog Node build client, but no PostHog browser SDK. Add browser initialization for the production hostname using the existing public write-only project token. Capture pageviews and interactions, report explicit filter selections, and forward successful single, ZIP and Bambu bundle downloads to both analytics providers.

The SDK loads asynchronously and queues early events. Provider failures are isolated from each other and from downloads. Local/preview hosts do not initialize PostHog. Session replay and surveys are disabled; anonymous visitors do not create identified person profiles.

Validation:

  • 241 tests passed locally, covering early-event queuing, duplicate initialization, excluded hosts, provider failures and an actual dropdown handler.
  • Local Safari preview loads and selecting OrcaSlicer renders 174 presets across 53 materials.
  • JavaScript syntax and git diff --check pass.
  • Live PostHog event verification follows Pages deployment.

@Jingxi-Polymaker
Jingxi-Polymaker merged commit e83efce into main Sep 7, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant