Skip to content

docs: add EU and India data residency callout to README quick start - #485

Draft
rahul-mixpanel wants to merge 2 commits into
masterfrom
rahulraveendran-sdk-247-react-native-361-eu-residency-setup
Draft

rahul-mixpanel wants to merge 2 commits into
masterfrom
rahulraveendran-sdk-247-react-native-361-eu-residency-setup

Conversation

@rahul-mixpanel

Copy link
Copy Markdown
Contributor

Summary

Adds an [!IMPORTANT] callout under Quick Start → 2. Initialize Mixpanel. It says that projects with EU or India data residency must pass the regional server URL as the third argument to init(), and shows both snippets. Without that URL, events are not ingested. Until now, users only found this on docs.mixpanel.com.

The snippets match the public React Native docs (sections "EU Data Residency" and "India Data Residency"). Docs only: no code or behaviour change.

Related to #361 (SDK-247)

Test plan

  • npx jest: 528 passed, 4 skipped
  • Both linked docs pages return 200

🤖 Generated with Claude Code

Projects with EU or India data residency must pass the regional server
URL to init(), or events are not ingested. The README quick start didn't
mention this, so users only found it on docs.mixpanel.com.

Related to #361

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

linear-code Bot commented Nov 27, 2026

Copy link
Copy Markdown

SDK-247

@greptile-apps

greptile-apps Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The documentation change appears safe to merge, with a non-blocking correction to the setServerURL() advice.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The documentation change appears safe to merge, with a non-blocking correction to the setServerURL() advice.

Findings

  1. P2 Regional URL gets overwritten ▶
Fix with agent prompt
### Issue 1
README.md:115
In JavaScript mode, calling `setServerURL()` directly after the shown unawaited `mixpanel.init()` sets the regional URL, but `initialize()` overwrites it with the default US URL after its storage waits finish. Events then go to the wrong region. Remove this alternative or show `await mixpanel.init()` before `setServerURL()`.

```suggestion
> If your project uses [EU](https://docs.mixpanel.com/docs/privacy/eu-residency) or [India](https://docs.mixpanel.com/docs/privacy/in-residency) data residency, pass your region's server URL as the third argument to `init()`. Mixpanel won't ingest events sent to the wrong region. Use one of:
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (2) · Last reviewed commit: "docs: split EU and India init snippets a..." · Reviewed by Greptile

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread README.md
Once you've called this method once, you can access `mixpanel` throughout the rest of your application.

> [!IMPORTANT]
> If your project uses [EU](https://docs.mixpanel.com/docs/privacy/eu-residency) or [India](https://docs.mixpanel.com/docs/privacy/in-residency) data residency, pass your region's server URL as the third argument to `init()` (or call `setServerURL()` later). Mixpanel won't ingest events sent to the wrong region. Use one of:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Regional URL gets overwritten

In JavaScript mode, calling setServerURL() directly after the shown unawaited mixpanel.init() sets the regional URL, but initialize() overwrites it with the default US URL after its storage waits finish. Events then go to the wrong region. Remove this alternative or show await mixpanel.init() before setServerURL().

Suggested change
> If your project uses [EU](https://docs.mixpanel.com/docs/privacy/eu-residency) or [India](https://docs.mixpanel.com/docs/privacy/in-residency) data residency, pass your region's server URL as the third argument to `init()` (or call `setServerURL()` later). Mixpanel won't ingest events sent to the wrong region. Use one of:
> If your project uses [EU](https://docs.mixpanel.com/docs/privacy/eu-residency) or [India](https://docs.mixpanel.com/docs/privacy/in-residency) data residency, pass your region's server URL as the third argument to `init()`. Mixpanel won't ingest events sent to the wrong region. Use one of:

Knowledge Base Used: SDK initialization and configuration

Prompt To Fix With AI
This is a comment left during a code review.
Path: README.md
Line: 115

Comment:
**Regional URL gets overwritten**

In JavaScript mode, calling `setServerURL()` directly after the shown unawaited `mixpanel.init()` sets the regional URL, but `initialize()` overwrites it with the default US URL after its storage waits finish. Events then go to the wrong region. Remove this alternative or show `await mixpanel.init()` before `setServerURL()`.

```suggestion
> If your project uses [EU](https://docs.mixpanel.com/docs/privacy/eu-residency) or [India](https://docs.mixpanel.com/docs/privacy/in-residency) data residency, pass your region's server URL as the third argument to `init()`. Mixpanel won't ingest events sent to the wrong region. Use one of:
```

**Knowledge Base Used:** [SDK initialization and configuration](https://app.greptile.com/-/switch-tenant?tenant=mixpanel&next=%2Fcustom-context%2Fknowledge-base%2Fmixpanel%2Fmixpanel-react-native%2F-%2Fdocs%2Fsdk-initialization-and-configuration.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

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