Skip to content

Add PostHog to the site - #36

Merged
kewonit merged 1 commit into
mainfrom
posthog
Nov 23, 2026
Merged

kewonit merged 1 commit into
mainfrom
posthog

Conversation

@kewonit

@kewonit kewonit commented Nov 23, 2026

Copy link
Copy Markdown
Owner

Adds PostHog to outbound.edbn.me, set up like ui.edbn.me and in the same edbn project. Plausible stays as it is.

What it sends

  • Page views, clicks, heatmaps, web vitals, errors, dead clicks and session replay.
  • The events Plausible already counts (Buy, Download, FAQ, Language, Waitlist, Feedback, Purchase with revenue and currency), from the same track() in each script.

How it loads

  • Only on outbound.edbn.me. Local and preview builds send nothing.
  • Through /ingest on the Worker (added to run_worker_first), so blockers that match PostHog's hosts don't drop it. Only content-type, user-agent and accept go on, plus the visitor's IP for the rough location.
  • The loader starts /ingest/static/array.js through the existing Trusted Types policy. A default policy lets PostHog's own scripts through, and only same-origin ones under /ingest/static/ or /ingest/array/. The CSP is unchanged.

Privacy

  • Local storage only, never a cookie. ui.edbn.me sets its cookie on .edbn.me, so a cookie here would tie Outbound visits to ui accounts.
  • Recordings mask every input and skip the thank-you page's key and email and the homepage key buttons (ph-no-capture).
  • A Polar checkout referrer is cut to its host, so the checkout address never reaches PostHog.
  • The privacy policy says all of this (sections 2, 6, 10, 11 and 13, dated 24 November 2026).

Tested

  • npm run build passes.
  • With a temporary localhost switch under wrangler dev: the homepage and the thank-you page load PostHog with no CSP or Trusted Types errors, recording starts and uploads, an FAQ click arrives, no cookie is set, and the key elements carry ph-no-capture.

After merging, open the live site and check that events from outbound.edbn.me show up in PostHog, with a recording.

Same edbn project as ui.edbn.me, on outbound.edbn.me only, sent through
/ingest on the Worker so blockers don't drop it. Page views, clicks,
heatmaps, web vitals, errors and session replay, plus the events Plausible
already counts. Local storage only, no cookie, so visits never join up
with ui.edbn.me. Recordings mask inputs and skip the license key and
email. Privacy policy says all of this.
@kewonit
kewonit merged commit 3b6449a into main Nov 23, 2026
4 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