Skip to content

feat(telemetry): send product analytics to our own analytics service - #129

Open
lauridskern wants to merge 1 commit into
mainfrom
feat/self-hosted-analytics
Open

lauridskern wants to merge 1 commit into
mainfrom
feat/self-hosted-analytics

Conversation

@lauridskern

Copy link
Copy Markdown
Collaborator

Product analytics now go to our own analytics service at https://anal.margelo.com instead of Mixpanel's EU project.

The service takes Mixpanel's ingestion API (/track, /engage), so the plugin sends exactly the same requests: only the host and the project token change. Mixpanel's full history up to 19 November 2026 16:04 UTC (4.47M events and 611 installation profiles) has already been imported, so the dashboards there start with all of it.

Changes

  • packages/shared/src/telemetry.ts: MIXPANEL_* constants become ANALYTICS_TOKEN, ANALYTICS_TRACK_URL and ANALYTICS_ENGAGE_URL, pointing at anal.margelo.com with the same ip=0&verbose=1.
  • packages/core/src/analytics.ts and its test use the renamed constants. Batching, opt-outs and the { status: 1 } check are unchanged.
  • docs/telemetry.md, PRIVACY.md and the website privacy page describe the new service.

Needs a look before merging

  • Data location moves from the EU to the US. The service runs on Vercel (Washington, D.C.) and stores analytics in MotherDuck (AWS US East). The privacy policy now says so and lists Vercel and MotherDuck as recipients. Mixpanel stays listed, since releases up to 0.1.189 keep sending there until they update.
  • Retention. The policy still says product analytics are kept "up to 24 months, then deleted". The new service doesn't delete old events automatically yet.
  • Pre-existing: PRIVACY.md says "We do not create user profiles", while the plugin sends installation profiles (the website copy already describes them). Not changed here.

Testing

  • node --test packages/core/test/analytics.test.ts: 6/6 pass.
  • npm run typecheck:telemetry passes.
  • npm test: 1484 pass, 12 fail; the same 12 fail on unmodified main in this environment (vendored runtimes and native helpers that aren't built locally).
  • The service itself was checked with the exact request shapes the plugin sends (JSON arrays to /track and /engage with ip=0&verbose=1); it replies {"status":1,"error":null}.

Product analytics go to anal.margelo.com instead of Mixpanel's EU project.
The service takes Mixpanel's ingestion API, so the requests are unchanged
apart from the host and project token. Mixpanel's history up to 19 November
2026 was imported there.

The privacy policy and telemetry docs name the new hosting: Vercel and
MotherDuck in the United States. Releases up to 0.1.189 keep sending to
Mixpanel until they update.
@vercel

vercel Bot commented Nov 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
mobile-dev Ready Ready Preview Nov 19, 2026 4:28pm UTC

Request Review

This branch has not been deployed

No deployments
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