Repository navigation
docs: add EU and India data residency callout to README quick start - #485
Draft
rahul-mixpanel wants to merge 2 commits into
Draft
rahul-mixpanel wants to merge 2 commits into
rahul-mixpanel wants to merge 2 commits into
Conversation
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>
[Low impact] The documentation change appears safe to merge, with a non-blocking correction to the Findings
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>
| 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: |
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 toinit(), 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🤖 Generated with Claude Code