Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions apps/mesh/src/web/lib/posthog-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ export function initPostHog(key: string, host: string) {
if (initialized || typeof window === "undefined") return;
posthog.init(key, {
api_host: host,
// Persist the PostHog cookie on the `.decocms.com` root domain so a visitor
// is the SAME person across www.decocms.com (landing) and
// studio.decocms.com (this app). Required for the unified
// acquisition → signup funnel — both surfaces must share ONE project key
// for the cookie to match. posthog-js defaults this to true; pinned
// explicitly so it can't silently regress and break cross-domain identity.
cross_subdomain_cookie: true,
capture_pageview: "history_change",
capture_pageleave: true,
autocapture: true,
Expand Down
Loading