Skip to content
This repository was archived by the owner on Jun 23, 2026. It is now read-only.

fix: share Mixpanel identity across *.thegrid.ai subdomains#73

Open
CastilloLuis wants to merge 1 commit into
mainfrom
fix/mix-panel-changes
Open

fix: share Mixpanel identity across *.thegrid.ai subdomains#73
CastilloLuis wants to merge 1 commit into
mainfrom
fix/mix-panel-changes

Conversation

@CastilloLuis

Copy link
Copy Markdown
Collaborator

Summary

  • Switch Mixpanel persistence from origin-scoped localStorage to a cross-subdomain cookie so agentsea (agentsea.thegrid.ai) shares a single distinct_id with the other *.thegrid.ai properties (app, landing, manifesto) — all on the same prod token.
  • Sets persistence: "cookie" + cross_subdomain_cookie: true (the latter is a no-op without the former).
  • Keeps save_referrer: false, so first-touch source seeding remains the sole writer of $initial_referring_domain (no OAuth/Stripe referrer-clobber risk here).

Why

Previously each subdomain minted its own anonymous identity, inflating unique user counts and breaking cross-property funnels/retention/attribution. This matches the cross-subdomain cookie config already shipped in grid-ui, the landing page, and the manifesto (The-Grid PR #76).

Test plan

  • Load agentsea.thegrid.ai, confirm the Mixpanel cookie is scoped to .thegrid.ai (DevTools → Application → Cookies) and the distinct_id matches one carried over from app.thegrid.ai.
  • Navigate agentsea → app and confirm a single distinct_id (no new identity).
  • Confirm $initial_referring_domain reflects the real first-touch source, not an internal subdomain.

Made with Cursor

Switch Mixpanel persistence to a cross-subdomain cookie so agentsea
(agentsea.thegrid.ai) shares one distinct_id with the app, landing, and
manifesto properties (all on the same prod token). Previously the
origin-scoped localStorage store minted a separate identity per
subdomain, inflating unique user counts and breaking cross-property
funnels/attribution.

Set persistence: "cookie" + cross_subdomain_cookie: true (the latter is
a no-op without the former). save_referrer: false is kept, so the
first-touch source seeding remains the sole writer of
$initial_referring_domain.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant