Skip to content

docs: show EU and India hosts next to every SDK init snippet - #293

Open
tylergoerzen-mxp wants to merge 3 commits into
mainfrom
tylergoerzen/tof-687-regional-hosts
Open

tylergoerzen-mxp wants to merge 3 commits into
mainfrom
tylergoerzen/tof-687-regional-hosts

Conversation

@tylergoerzen-mxp

@tylergoerzen-mxp tylergoerzen-mxp commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Why

Data residency is the second most common reason AI coding agents give for picking a self-hostable competitor in the AEO tracker. It comes up in 20 of the 34 coding explanations that cite open source. Agents also hedge on whether Mixpanel supports residency at all.

Our docs make that easy to miss. The install page has no regional host line. The JS SDK's EU section sits near the bottom of a long page, under Privacy-Friendly Tracking. Every SDK page already had a warning near init, but it didn't name the setting or the host, and it linked to the privacy section instead of the example.

What changed

Install Mixpanel (docs/quickstart/install-mixpanel.mdx)

  • One sentence under "Code": Mixpanel supports EU and India data residency, chosen per project, with links to the existing EU and India residency pages.
  • In each SDK tab, right after the init snippet, a small EU / India code group:
Tab Setting
JavaScript api_host: "https://api-eu.mixpanel.com" / api-in
Python Consumer(api_host="api-eu.mixpanel.com") / api-in
PHP "host" => "api-eu.mixpanel.com" / api-in
Node host: "api-eu.mixpanel.com" / api-in
Go mixpanel.EuResidency() / mixpanel.InResidency()
Ruby Mixpanel::Consumer with /track, /engage, /groups on the regional host
Java MixpanelAPI constructor with /track, /engage, /groups on the regional host
React Native serverURL as the third init() argument
Flutter serverURL: in Mixpanel.init()
iOS (Objective-C) mixpanel.serverURL = @"https://api-eu.mixpanel.com"
iOS (Swift) serverURL in MixpanelOptions
Android serverURL on MixpanelOptions.Builder, passed to getInstance()
Unity No code. A line saying to set API Host Address in the Mixpanel settings menu
HTTP API A line pointing Ingestion API requests at api-eu / api-in

SDK pages (13 files under docs/tracking-methods/sdks/)

  • Rewrote the existing residency <Warning> next to init on JavaScript, iOS, Swift, Android, React Native, Flutter, Unity, Python, Java, Ruby, Node.js, Go, and PHP. Each now names the SDK's setting, gives both hosts, and links to that page's own EU and India sections. No sections were moved or added.

Skipped

None. Every SDK in the quickstart already documented its EU and India setting on its own page.

Also fixed two existing bugs on these pages: the Objective-C EU and India examples declared a local mixpanel and then set self.mixpanel.serverURL (now uses the local variable), and the Unity and Node.js India sections said "EU servers" (now "India servers").

How values were verified

  • Every option name and host comes from the SDK's own EU and India Data Residency section in this repo.
  • I cross-checked each one against the SDK source on GitHub (default branch, 2026-10-02): api_host in mixpanel-js src/mixpanel-core.js, serverURL in mixpanel-iphone Mixpanel.h, mixpanel-swift MixpanelOptions.swift, mixpanel-android MixpanelOptions.java (plus the getInstance(context, token, trackAutomaticEvents, options) overload), the mixpanel-react-native init() signature, the mixpanel-flutter README, APIHostAddress in mixpanel-unity MixpanelSettings.cs, Consumer(api_host=...) in mixpanel-python, Consumer.new endpoints in mixpanel-ruby, host in mixpanel-node and mixpanel-php, EuResidency() / InResidency() in mixpanel-go, and the 3-argument MixpanelAPI constructor in mixpanel-java.
  • Ingestion hosts for the HTTP API tab come from the tables on the EU and India residency pages.

Checks run locally:

  • npx mint validate: build validation passed
  • npx mint broken-links: no broken links found
  • scripts/check_frontmatter.py, check_code_samples.py, check_links.py, check_redirects.py: all passed
  • docs.json not touched

Linear

TOF-687

🤖 Generated with Claude Code

Add the regional host to the install quickstart (one EU/India code group
per SDK tab) and rewrite the residency warning on each SDK page so it names
the option and both hosts and links to the in-page examples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
mixpanel-docs 🟢 Ready View Preview Oct 2, 2026, 9:43 PM

@linear-code

linear-code Bot commented Oct 2, 2026

Copy link
Copy Markdown

TOF-687

The Objective-C EU and India examples declared a local `mixpanel` and then
set `self.mixpanel.serverURL`, which doesn't compile outside a class with
that property. Use the local variable.

The Unity and Node.js India sections said "EU servers" while setting the
India host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low risk] Documentation updates for SDK configuration guidance.

The PR appears safe to merge.

Reviews (2) · Last reviewed commit: "Keep quickstart tracking settings in JS ..."

Comment thread docs/quickstart/install-mixpanel.mdx
Comment thread docs/quickstart/install-mixpanel.mdx Outdated
…S projects do

The EU and India JavaScript examples replaced the quickstart config with
api_host alone, so anyone copying them lost page views, Session Replay and
heatmaps. They now keep the full config and add api_host. Each SDK tab
also says US projects use the default host and need no change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
staging — b5828077 Deployed Oct 2, 2026 by mintlify[bot]
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