From 06a6fd99dd7c0d180554cbd7c85a7b4fca66ff07 Mon Sep 17 00:00:00 2001 From: Tyler Goerzen Date: Fri, 2 Oct 2026 14:35:28 -0700 Subject: [PATCH 1/3] docs: show EU and India hosts next to every SDK init snippet (TOF-687) 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 --- docs/quickstart/install-mixpanel.mdx | 238 ++++++++++++++++++++ docs/tracking-methods/sdks/android.mdx | 2 +- docs/tracking-methods/sdks/flutter.mdx | 2 +- docs/tracking-methods/sdks/go.mdx | 2 +- docs/tracking-methods/sdks/ios.mdx | 2 +- docs/tracking-methods/sdks/java/index.mdx | 2 +- docs/tracking-methods/sdks/javascript.mdx | 2 +- docs/tracking-methods/sdks/nodejs.mdx | 2 +- docs/tracking-methods/sdks/php.mdx | 2 +- docs/tracking-methods/sdks/python.mdx | 2 +- docs/tracking-methods/sdks/react-native.mdx | 2 +- docs/tracking-methods/sdks/ruby.mdx | 2 +- docs/tracking-methods/sdks/swift.mdx | 2 +- docs/tracking-methods/sdks/unity.mdx | 2 +- 14 files changed, 251 insertions(+), 13 deletions(-) diff --git a/docs/quickstart/install-mixpanel.mdx b/docs/quickstart/install-mixpanel.mdx index a0e285ef3..8d16d861e 100644 --- a/docs/quickstart/install-mixpanel.mdx +++ b/docs/quickstart/install-mixpanel.mdx @@ -14,6 +14,8 @@ Already collect product data? Connect your [**Data Warehouse**](/docs/tracking-m Choose from the methods below. Not sure how to choose? [Read our guide](/docs/tracking-methods/choosing-the-right-method). +Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in-residency) data residency, which you choose per project. If your project uses either, point the SDK at that region's host. Each tab below shows how. Events sent to the wrong region aren't ingested. + {/* TABS */} @@ -60,6 +62,24 @@ Choose from the methods below. Not sure how to choose? [Read our guide](/docs/tr record_heatmap_data: true, }); ``` + + For an EU or India project, set `api_host`: + + + + ```js EU + mixpanel.init("YOUR_TOKEN", { + api_host: "https://api-eu.mixpanel.com", + }); + ``` + + ```js India + mixpanel.init("YOUR_TOKEN", { + api_host: "https://api-in.mixpanel.com", + }); + ``` + + ##### Install the SDK @@ -77,6 +97,24 @@ Choose from the methods below. Not sure how to choose? [Read our guide](/docs/tr mp = Mixpanel("YOUR_TOKEN") ``` + + For an EU or India project, pass a `Consumer` with `api_host` set: + + + + ```python EU + from mixpanel import Mixpanel, Consumer + + mp = Mixpanel("YOUR_TOKEN", consumer=Consumer(api_host="api-eu.mixpanel.com")) + ``` + + ```python India + from mixpanel import Mixpanel, Consumer + + mp = Mixpanel("YOUR_TOKEN", consumer=Consumer(api_host="api-in.mixpanel.com")) + ``` + + ##### Install the SDK @@ -112,6 +150,28 @@ Choose from the methods below. Not sure how to choose? [Read our guide](/docs/tr ?> ``` + + For an EU or India project, set the `host` option: + + + + ```php EU + "api-eu.mixpanel.com" + )); + ?> + ``` + + ```php India + "api-in.mixpanel.com" + )); + ?> + ``` + + ##### Install the SDK @@ -131,6 +191,24 @@ Choose from the methods below. Not sure how to choose? [Read our guide](/docs/tr // Create an instance of the mixpanel client var mixpanel = Mixpanel.init("YOUR_TOKEN"); ``` + + For an EU or India project, set `host`: + + + + ```js EU + var mixpanel = Mixpanel.init("YOUR_TOKEN", { + host: "api-eu.mixpanel.com", + }); + ``` + + ```js India + var mixpanel = Mixpanel.init("YOUR_TOKEN", { + host: "api-in.mixpanel.com", + }); + ``` + + ##### Install the SDK @@ -156,6 +234,20 @@ Choose from the methods below. Not sure how to choose? [Read our guide](/docs/tr mp := mixpanel.NewApiClient("YOUR_TOKEN") } ``` + + For an EU or India project, pass the matching residency option: + + + + ```go EU + mp := mixpanel.NewApiClient("YOUR_TOKEN", mixpanel.EuResidency()) + ``` + + ```go India + mp := mixpanel.NewApiClient("YOUR_TOKEN", mixpanel.InResidency()) + ``` + + ##### Install the SDK @@ -173,6 +265,36 @@ Choose from the methods below. Not sure how to choose? [Read our guide](/docs/tr mp = Mixpanel::Tracker.new(YOUR_TOKEN) ``` + + For an EU or India project, send messages through a consumer that uses the regional host: + + + + ```ruby EU + consumer = Mixpanel::Consumer.new( + 'https://api-eu.mixpanel.com/track', + 'https://api-eu.mixpanel.com/engage', + 'https://api-eu.mixpanel.com/groups', + ) + + mp = Mixpanel::Tracker.new(YOUR_TOKEN) do |type, message| + consumer.send!(type, message) + end + ``` + + ```ruby India + consumer = Mixpanel::Consumer.new( + 'https://api-in.mixpanel.com/track', + 'https://api-in.mixpanel.com/engage', + 'https://api-in.mixpanel.com/groups', + ) + + mp = Mixpanel::Tracker.new(YOUR_TOKEN) do |type, message| + consumer.send!(type, message) + end + ``` + + ##### Install the SDK @@ -200,6 +322,24 @@ Choose from the methods below. Not sure how to choose? [Read our guide](/docs/tr MessageBuilder messageBuilder = new MessageBuilder('YOUR_TOKEN'); ``` + + For an EU or India project, pass the regional endpoints to `MixpanelAPI`: + + + + ```java EU + MixpanelAPI mixpanel = new MixpanelAPI("https://api-eu.mixpanel.com/track", + "https://api-eu.mixpanel.com/engage", + "https://api-eu.mixpanel.com/groups"); + ``` + + ```java India + MixpanelAPI mixpanel = new MixpanelAPI("https://api-in.mixpanel.com/track", + "https://api-in.mixpanel.com/engage", + "https://api-in.mixpanel.com/groups"); + ``` + + ##### Install the SDK @@ -231,6 +371,20 @@ Choose from the methods below. Not sure how to choose? [Read our guide](/docs/tr const mixpanel = new Mixpanel("YOUR_TOKEN", trackAutomaticEvents); mixpanel.init(); ``` + + For an EU or India project, pass the regional host as the third argument to `init()`: + + + + ```javascript EU + mixpanel.init(false, {}, "https://api-eu.mixpanel.com"); + ``` + + ```javascript India + mixpanel.init(false, {}, "https://api-in.mixpanel.com"); + ``` + + ##### Install the SDK @@ -262,6 +416,28 @@ Choose from the methods below. Not sure how to choose? [Read our guide](/docs/tr } } ``` + + For an EU or India project, pass `serverURL`: + + + + ```dart EU + mixpanel = await Mixpanel.init( + "YOUR_TOKEN", + trackAutomaticEvents: false, + serverURL: "https://api-eu.mixpanel.com", + ); + ``` + + ```dart India + mixpanel = await Mixpanel.init( + "YOUR_TOKEN", + trackAutomaticEvents: false, + serverURL: "https://api-in.mixpanel.com", + ); + ``` + + ##### Install the SDK @@ -294,6 +470,20 @@ Choose from the methods below. Not sure how to choose? [Read our guide](/docs/tr ... } ``` + + For an EU or India project, set `serverURL` after initialization: + + + + ```objc EU + mixpanel.serverURL = @"https://api-eu.mixpanel.com"; + ``` + + ```objc India + mixpanel.serverURL = @"https://api-in.mixpanel.com"; + ``` + + ##### Install the SDK @@ -332,6 +522,28 @@ Choose from the methods below. Not sure how to choose? [Read our guide](/docs/tr ... } ``` + + For an EU or India project, set `serverURL` in `MixpanelOptions`: + + + + ```swift EU + let options = MixpanelOptions( + token: "YOUR_TOKEN", + serverURL: "https://api-eu.mixpanel.com" + ) + Mixpanel.initialize(options: options) + ``` + + ```swift India + let options = MixpanelOptions( + token: "YOUR_TOKEN", + serverURL: "https://api-in.mixpanel.com" + ) + Mixpanel.initialize(options: options) + ``` + + ##### Install the SDK @@ -380,6 +592,28 @@ Choose from the methods below. Not sure how to choose? [Read our guide](/docs/tr } } ``` + + For an EU or India project, set `serverURL` with `MixpanelOptions`: + + + + ```java EU + MixpanelOptions options = new MixpanelOptions.Builder() + .serverURL("https://api-eu.mixpanel.com") + .build(); + + mp = MixpanelAPI.getInstance(this, "YOUR_TOKEN", trackAutomaticEvents, options); + ``` + + ```java India + MixpanelOptions options = new MixpanelOptions.Builder() + .serverURL("https://api-in.mixpanel.com") + .build(); + + mp = MixpanelAPI.getInstance(this, "YOUR_TOKEN", trackAutomaticEvents, options); + ``` + + ##### Install the SDK @@ -396,6 +630,8 @@ Choose from the methods below. Not sure how to choose? [Read our guide](/docs/tr ![unity\_screenshots](https://user-images.githubusercontent.com/36679208/152408022-62440f50-04c7-4ff3-b331-02d3d3122c9e.jpg) + For an EU or India project, set **API Host Address** in the same settings menu to `https://api-eu.mixpanel.com/` or `https://api-in.mixpanel.com/`. + Note: If you prefer to initialize Mixpanel manually, you can select the `Manual Initialization` in the settings and call `Mixpanel.Init()` to initialize. To use mixpanel, add the following sample code to a part of your application: @@ -414,6 +650,8 @@ Choose from the methods below. Not sure how to choose? [Read our guide](/docs/tr Using the HTTP API does not require an installation. **You're ready to move to the next step.** + + For an EU or India project, send [Ingestion API](/reference/ingestion-api) requests to `api-eu.mixpanel.com` or `api-in.mixpanel.com` instead of `api.mixpanel.com`. diff --git a/docs/tracking-methods/sdks/android.mdx b/docs/tracking-methods/sdks/android.mdx index 05f749a7f..150567967 100644 --- a/docs/tracking-methods/sdks/android.mdx +++ b/docs/tracking-methods/sdks/android.mdx @@ -73,7 +73,7 @@ public class MainActivity extends ActionBarActivity { ### Library Configuration - For projects with EU or India data residency, you must configure the SDK to use the correct regional endpoint. Events sent to the wrong region will not be ingested. Learn more about [Privacy-Friendly Tracking](/docs/tracking-methods/sdks/android#privacy-friendly-tracking). + Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in-residency) data residency, which you choose per project. If your project uses either, set `serverURL` to `https://api-eu.mixpanel.com` or `https://api-in.mixpanel.com` on `MixpanelOptions.Builder` and pass the options to `getInstance()`. Events sent to the wrong region aren't ingested. See [EU Data Residency](#eu-data-residency) and [India Data Residency](#india-data-residency) for examples. The library can be initialized with different configurations. See a complete list of the configuration options and methods under [`MPConfig`](https://mixpanel.github.io/mixpanel-android/com/mixpanel/android/mpmetrics/MPConfig.html). diff --git a/docs/tracking-methods/sdks/flutter.mdx b/docs/tracking-methods/sdks/flutter.mdx index 581a262a8..2d269cedc 100644 --- a/docs/tracking-methods/sdks/flutter.mdx +++ b/docs/tracking-methods/sdks/flutter.mdx @@ -62,7 +62,7 @@ Add the following snippet to your `web/index.html` inside the `` ta ### Library Configuration - For projects with EU or India data residency, you must configure the SDK to use the correct regional endpoint. Events sent to the wrong region will not be ingested. Learn more about [Privacy-Friendly Tracking](/docs/tracking-methods/sdks/flutter#privacy-friendly-tracking). + Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in-residency) data residency, which you choose per project. If your project uses either, pass `serverURL` set to `https://api-eu.mixpanel.com` or `https://api-in.mixpanel.com` to `Mixpanel.init()`. Events sent to the wrong region aren't ingested. See [EU Data Residency](#eu-data-residency) and [India Data Residency](#india-data-residency) for examples. The Mixpanel instance can be customized with different configurations. The [`Mixpanel.init()`](https://mixpanel.github.io/mixpanel-flutter/mixpanel_flutter/Mixpanel/init.html) method accepts arguments that sets some configurations on your instance upon initialization. diff --git a/docs/tracking-methods/sdks/go.mdx b/docs/tracking-methods/sdks/go.mdx index 777a7ebbe..0471145be 100644 --- a/docs/tracking-methods/sdks/go.mdx +++ b/docs/tracking-methods/sdks/go.mdx @@ -28,7 +28,7 @@ mp := mixpanel.NewApiClient("YOUR_PROJECT_TOKEN") ### Library Configuration - For projects with EU or India data residency, you must configure the SDK to use the correct regional endpoint. Events sent to the wrong region will not be ingested. Learn more about [Privacy-Friendly Tracking](/docs/tracking-methods/sdks/go#privacy-friendly-tracking). + Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in-residency) data residency, which you choose per project. If your project uses either, pass `mixpanel.EuResidency()` or `mixpanel.InResidency()` to `NewApiClient()`. These options send requests to `api-eu.mixpanel.com` or `api-in.mixpanel.com`. Events sent to the wrong region aren't ingested. See [EU Data Residency](#eu-data-residency) and [India Data Residency](#in-data-residency) for examples. The library can be initialized with different configurations. See a complete list of the configuration options[here](https://pkg.go.dev/github.com/mixpanel/mixpanel-go#Options). diff --git a/docs/tracking-methods/sdks/ios.mdx b/docs/tracking-methods/sdks/ios.mdx index 43fa37245..e343a529f 100644 --- a/docs/tracking-methods/sdks/ios.mdx +++ b/docs/tracking-methods/sdks/ios.mdx @@ -94,7 +94,7 @@ Mixpanel *mixpanel = [Mixpanel sharedInstance]; ### Library Configuration - For projects with EU or India data residency, you must configure the SDK to use the correct regional endpoint. Events sent to the wrong region will not be ingested. Learn more about [Privacy-Friendly Tracking](/docs/tracking-methods/sdks/ios#privacy-friendly-tracking). + Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in-residency) data residency, which you choose per project. If your project uses either, set the `serverURL` property to `https://api-eu.mixpanel.com` or `https://api-in.mixpanel.com` after you initialize the Mixpanel instance. Events sent to the wrong region aren't ingested. See [EU Data Residency](#eu-data-residency) and [India Data Residency](#india-data-residency) for examples. The library can be initialized with different configurations. See a complete list of the configuration options [here](https://mixpanel.github.io/mixpanel-iphone/Classes/Mixpanel.html#//api/name/sharedInstanceWithToken:). diff --git a/docs/tracking-methods/sdks/java/index.mdx b/docs/tracking-methods/sdks/java/index.mdx index 1065ac04d..99e17e1fe 100644 --- a/docs/tracking-methods/sdks/java/index.mdx +++ b/docs/tracking-methods/sdks/java/index.mdx @@ -12,7 +12,7 @@ The [Full API Reference](http://mixpanel.github.io/mixpanel-java/), [Library Sou ## Installing the Library - For projects with EU or India data residency, you must configure the SDK to use the correct regional endpoint. Events sent to the wrong region will not be ingested. Learn more about [Privacy-Friendly Tracking](/docs/tracking-methods/sdks/java#privacy-friendly-tracking). + Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in-residency) data residency, which you choose per project. If your project uses either, pass the `/track`, `/engage`, and `/groups` URLs on `https://api-eu.mixpanel.com` or `https://api-in.mixpanel.com` to the `MixpanelAPI` constructor. Events sent to the wrong region aren't ingested. See [EU Data Residency](#eu-data-residency) and [India Data Residency](#india-data-residency) for examples. To install the library, declare it as a dependency in your project's `pom.xml` file: diff --git a/docs/tracking-methods/sdks/javascript.mdx b/docs/tracking-methods/sdks/javascript.mdx index 34282ec94..afaed5b01 100644 --- a/docs/tracking-methods/sdks/javascript.mdx +++ b/docs/tracking-methods/sdks/javascript.mdx @@ -86,7 +86,7 @@ The [Full API Reference](https://github.com/mixpanel/mixpanel-js/blob/master/doc ### Library Configuration - For projects with EU or India data residency, you must configure the SDK to use the correct regional endpoint. Events sent to the wrong region will not be ingested. Learn more about [Privacy-Friendly Tracking](/docs/tracking-methods/sdks/javascript#privacy-friendly-tracking). + Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in-residency) data residency, which you choose per project. If your project uses either, set `api_host` to `https://api-eu.mixpanel.com` or `https://api-in.mixpanel.com` in the `init()` config. Events sent to the wrong region aren't ingested. See [EU Data Residency](#eu-data-residency) and [India Data Residency](#india-data-residency) for examples. The Mixpanel object can be initialized with different configurations. See a complete list of the configuration options and default values [here](https://github.com/mixpanel/mixpanel-js/blob/master/doc/readme.io/javascript-full-api-reference.md#mixpanelset_config). diff --git a/docs/tracking-methods/sdks/nodejs.mdx b/docs/tracking-methods/sdks/nodejs.mdx index cfc134025..d090746eb 100644 --- a/docs/tracking-methods/sdks/nodejs.mdx +++ b/docs/tracking-methods/sdks/nodejs.mdx @@ -37,7 +37,7 @@ const mp = Mixpanel.init('YOUR_PROJECT_TOKEN') ## Library Configuration - For projects with EU or India data residency, you must configure the SDK to use the correct regional endpoint. Events sent to the wrong region will not be ingested. Learn more about [Privacy-Friendly Tracking](/docs/tracking-methods/sdks/nodejs#privacy-friendly-tracking). + Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in-residency) data residency, which you choose per project. If your project uses either, set `host` to `api-eu.mixpanel.com` or `api-in.mixpanel.com` in the `init()` config. Events sent to the wrong region aren't ingested. See [EU Data Residency](#eu-data-residency) and [India Data Residency](#india-data-residency) for examples. The Mixpanel object can be initialized with different configurations. See a complete list of the configuration options[here](https://github.com/mixpanel/mixpanel-node/blob/master/lib/mixpanel-node.d.ts#L17). diff --git a/docs/tracking-methods/sdks/php.mdx b/docs/tracking-methods/sdks/php.mdx index 56f7640fd..1fb1b5ebb 100644 --- a/docs/tracking-methods/sdks/php.mdx +++ b/docs/tracking-methods/sdks/php.mdx @@ -59,7 +59,7 @@ The [Full API Reference](https://mixpanel.github.io/mixpanel-php/), [Library Sou ### Library Configuration - For projects with EU or India data residency, you must configure the SDK to use the correct regional endpoint. Events sent to the wrong region will not be ingested. Learn more about [Privacy-Friendly Tracking](/docs/tracking-methods/sdks/php#privacy-friendly-tracking). + Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in-residency) data residency, which you choose per project. If your project uses either, set `host` to `api-eu.mixpanel.com` or `api-in.mixpanel.com` in the `getInstance()` options. Events sent to the wrong region aren't ingested. See [EU Data Residency](#eu-data-residency) and [India Data Residency](#india-data-residency) for examples. The Mixpanel class can be initialized with different configurations. See a complete list of the configuration options and default values [here](https://mixpanel.github.io/mixpanel-php/classes/Mixpanel.html). diff --git a/docs/tracking-methods/sdks/python.mdx b/docs/tracking-methods/sdks/python.mdx index 7ca00625e..3eca62ae9 100644 --- a/docs/tracking-methods/sdks/python.mdx +++ b/docs/tracking-methods/sdks/python.mdx @@ -31,7 +31,7 @@ mp = Mixpanel("YOUR_PROJECT_TOKEN") ### Library Configuration - For projects with EU or India data residency, you must configure the SDK to use the correct regional endpoint. Events sent to the wrong region will not be ingested. Learn more about [Privacy-Friendly Tracking](/docs/tracking-methods/sdks/python#privacy-friendly-tracking). + Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in-residency) data residency, which you choose per project. If your project uses either, pass a `Consumer` with `api_host` set to `api-eu.mixpanel.com` or `api-in.mixpanel.com`. Events sent to the wrong region aren't ingested. See [EU Data Residency](#eu-data-residency) and [India Data Residency](#india-data-residency) for examples. The Mixpanel instance can be customized with different configurations using a custom `consumer`. Learn more about the consumer and the available parameters [here](https://mixpanel.github.io/mixpanel-python/#built-in-consumers). diff --git a/docs/tracking-methods/sdks/react-native.mdx b/docs/tracking-methods/sdks/react-native.mdx index bf157bcc5..3bbfe1e29 100644 --- a/docs/tracking-methods/sdks/react-native.mdx +++ b/docs/tracking-methods/sdks/react-native.mdx @@ -45,7 +45,7 @@ await mixpanel.init(); ### Library Configuration - For projects with EU or India data residency, you must configure the SDK to use the correct regional endpoint. Events sent to the wrong region will not be ingested. Learn more about [Privacy-Friendly Tracking](/docs/tracking-methods/sdks/react-native#privacy-friendly-tracking). + Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in-residency) data residency, which you choose per project. If your project uses either, pass `https://api-eu.mixpanel.com` or `https://api-in.mixpanel.com` as the `serverURL` argument (the third argument) to `init()`. Events sent to the wrong region aren't ingested. See [EU Data Residency](#eu-data-residency) and [India Data Residency](#india-data-residency) for examples. The `Mixpanel` constructor accepts up to four arguments: your project token, `trackAutomaticEvents`, an optional `useNative` flag (defaults to `true`), and an optional storage adapter for JavaScript mode. Additional runtime configuration is passed to `init()`. diff --git a/docs/tracking-methods/sdks/ruby.mdx b/docs/tracking-methods/sdks/ruby.mdx index 259f02dc3..1844beddf 100644 --- a/docs/tracking-methods/sdks/ruby.mdx +++ b/docs/tracking-methods/sdks/ruby.mdx @@ -14,7 +14,7 @@ See our [server](/docs/quickstart/install-mixpanel#ruby) quickstart for how to g ## Installing the Library - For projects with EU or India data residency, you must configure the SDK to use the correct regional endpoint. Events sent to the wrong region will not be ingested. Learn more about [Privacy-Friendly Tracking](/docs/tracking-methods/sdks/ruby#privacy-friendly-tracking). + Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in-residency) data residency, which you choose per project. If your project uses either, send messages through a `Mixpanel::Consumer` built with the `/track`, `/engage`, and `/groups` URLs on `https://api-eu.mixpanel.com` or `https://api-in.mixpanel.com`. Events sent to the wrong region aren't ingested. See [EU Data Residency](#eu-data-residency) and [India Data Residency](#india-data-residency) for examples. To install the library, call the following in your command line to install the `mixpanel-ruby` gem: diff --git a/docs/tracking-methods/sdks/swift.mdx b/docs/tracking-methods/sdks/swift.mdx index 091dd5662..df169bf48 100644 --- a/docs/tracking-methods/sdks/swift.mdx +++ b/docs/tracking-methods/sdks/swift.mdx @@ -86,7 +86,7 @@ func application(_ application: UIApplication, ### SDK Configuration Using MixpanelOptions - **Data Residency:** For projects with EU or India data residency, you must configure the SDK to use the correct [regional endpoint](#data-residency). Events sent to the wrong region will not be ingested. Learn more about [Privacy-Friendly Tracking](/docs/tracking-methods/sdks/swift#privacy-friendly-tracking) + Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in-residency) data residency, which you choose per project. If your project uses either, set `serverURL` in `MixpanelOptions` to `https://api-eu.mixpanel.com` or `https://api-in.mixpanel.com`. Events sent to the wrong region aren't ingested. See [EU Data Residency](#eu-data-residency) and [India Data Residency](#india-data-residency) for examples. Configure the Mixpanel SDK using [`MixpanelOptions`](https://mixpanel.github.io/mixpanel-swift/Classes/MixpanelOptions.html) to customize tracking behavior, data residency, privacy settings, and more. diff --git a/docs/tracking-methods/sdks/unity.mdx b/docs/tracking-methods/sdks/unity.mdx index 2209fecab..95899d00f 100644 --- a/docs/tracking-methods/sdks/unity.mdx +++ b/docs/tracking-methods/sdks/unity.mdx @@ -16,7 +16,7 @@ The [Full API Reference](http://mixpanel.github.io/mixpanel-unity/api-reference/ ## Installing the Library - For projects with EU or India data residency, you must configure the SDK to use the correct regional endpoint. Events sent to the wrong region will not be ingested. Learn more about [Privacy-Friendly Tracking](/docs/tracking-methods/sdks/unity#privacy-friendly-tracking). + Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in-residency) data residency, which you choose per project. If your project uses either, set **API Host Address** to `https://api-eu.mixpanel.com/` or `https://api-in.mixpanel.com/` in the Mixpanel project settings (Edit -\> Project Settings -\> Mixpanel). Events sent to the wrong region aren't ingested. See [EU Data Residency](#eu-data-residency) and [India Data Residency](#india-data-residency) for examples. This library can be installed using the unity package manager system with git. We support Unity 2018.3 and above. For older versions of Unity, you need to have .NET 4.x Equivalent selected as the scripting runtime version in your editor settings. From a34d94ae4e98d23afc55b478a3b3bcaea15c6eda Mon Sep 17 00:00:00 2001 From: Tyler Goerzen Date: Fri, 2 Oct 2026 14:37:57 -0700 Subject: [PATCH 2/3] Fix iOS residency examples and India section wording 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 --- docs/tracking-methods/sdks/ios.mdx | 4 ++-- docs/tracking-methods/sdks/nodejs.mdx | 2 +- docs/tracking-methods/sdks/unity.mdx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/tracking-methods/sdks/ios.mdx b/docs/tracking-methods/sdks/ios.mdx index e343a529f..70d2987b4 100644 --- a/docs/tracking-methods/sdks/ios.mdx +++ b/docs/tracking-methods/sdks/ios.mdx @@ -712,7 +712,7 @@ Route data to Mixpanel's EU servers by setting the `serverURL` flag after initia ```objc Objective-C // set request URL to Mixpanel's EU domain Mixpanel *mixpanel = [Mixpanel sharedInstance]; -self.mixpanel.serverURL = @"https://api-eu.mixpanel.com"; +mixpanel.serverURL = @"https://api-eu.mixpanel.com"; ``` ### India Data Residency @@ -722,7 +722,7 @@ Route data to Mixpanel's India servers by setting the `serverURL` flag after ini ```objc Objective-C // set request URL to Mixpanel's India domain Mixpanel *mixpanel = [Mixpanel sharedInstance]; -self.mixpanel.serverURL = @"https://api-in.mixpanel.com"; +mixpanel.serverURL = @"https://api-in.mixpanel.com"; ``` ### Disable Geolocation diff --git a/docs/tracking-methods/sdks/nodejs.mdx b/docs/tracking-methods/sdks/nodejs.mdx index d090746eb..0b1995a62 100644 --- a/docs/tracking-methods/sdks/nodejs.mdx +++ b/docs/tracking-methods/sdks/nodejs.mdx @@ -497,7 +497,7 @@ mixpanel.init('YOUR_PROJECT_TOKEN',{ ### India Data Residency -Route data to Mixpanel's EU servers by setting the [`host`](https://github.com/mixpanel/mixpanel-node/blob/master/lib/mixpanel-node.d.ts#L21) config property during the library initialization. +Route data to Mixpanel's India servers by setting the [`host`](https://github.com/mixpanel/mixpanel-node/blob/master/lib/mixpanel-node.d.ts#L21) config property during the library initialization. **Example Usage** diff --git a/docs/tracking-methods/sdks/unity.mdx b/docs/tracking-methods/sdks/unity.mdx index 95899d00f..87df3aaea 100644 --- a/docs/tracking-methods/sdks/unity.mdx +++ b/docs/tracking-methods/sdks/unity.mdx @@ -418,7 +418,7 @@ Route data to Mixpanel's EU servers by setting the `API Host Address` to `https: ### India Data Residency -Route data to Mixpanel's EU servers by setting the `API Host Address` to `https://api-in.mixpanel.com/` when configuring the library under the unity project settings menu for Mixpanel (Edit -\> Project Settings -\> Mixpanel). +Route data to Mixpanel's India servers by setting the `API Host Address` to `https://api-in.mixpanel.com/` when configuring the library under the unity project settings menu for Mixpanel (Edit -\> Project Settings -\> Mixpanel). ## Release History From b58280770578706fd751eed951dd05e0159e47c0 Mon Sep 17 00:00:00 2001 From: Tyler Goerzen Date: Fri, 2 Oct 2026 14:42:41 -0700 Subject: [PATCH 3/3] Keep quickstart tracking settings in JS regional examples; say what US 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 --- docs/quickstart/install-mixpanel.mdx | 36 ++++++++++++++++++---------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/docs/quickstart/install-mixpanel.mdx b/docs/quickstart/install-mixpanel.mdx index 8d16d861e..8fc87134d 100644 --- a/docs/quickstart/install-mixpanel.mdx +++ b/docs/quickstart/install-mixpanel.mdx @@ -63,19 +63,29 @@ Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in- }); ``` - For an EU or India project, set `api_host`: + US projects use the SDK's default host and need no change. For an EU or India project, set `api_host`: ```js EU mixpanel.init("YOUR_TOKEN", { api_host: "https://api-eu.mixpanel.com", + debug: true, + track_pageview: true, + persistence: "localStorage", + record_sessions_percent: 100, //records 100% of all sessions + record_heatmap_data: true, }); ``` ```js India mixpanel.init("YOUR_TOKEN", { api_host: "https://api-in.mixpanel.com", + debug: true, + track_pageview: true, + persistence: "localStorage", + record_sessions_percent: 100, //records 100% of all sessions + record_heatmap_data: true, }); ``` @@ -98,7 +108,7 @@ Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in- mp = Mixpanel("YOUR_TOKEN") ``` - For an EU or India project, pass a `Consumer` with `api_host` set: + US projects use the SDK's default host and need no change. For an EU or India project, pass a `Consumer` with `api_host` set: @@ -151,7 +161,7 @@ Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in- ?> ``` - For an EU or India project, set the `host` option: + US projects use the SDK's default host and need no change. For an EU or India project, set the `host` option: @@ -192,7 +202,7 @@ Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in- var mixpanel = Mixpanel.init("YOUR_TOKEN"); ``` - For an EU or India project, set `host`: + US projects use the SDK's default host and need no change. For an EU or India project, set `host`: @@ -235,7 +245,7 @@ Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in- } ``` - For an EU or India project, pass the matching residency option: + US projects use the SDK's default host and need no change. For an EU or India project, pass the matching residency option: @@ -266,7 +276,7 @@ Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in- mp = Mixpanel::Tracker.new(YOUR_TOKEN) ``` - For an EU or India project, send messages through a consumer that uses the regional host: + US projects use the SDK's default host and need no change. For an EU or India project, send messages through a consumer that uses the regional host: @@ -323,7 +333,7 @@ Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in- MessageBuilder messageBuilder = new MessageBuilder('YOUR_TOKEN'); ``` - For an EU or India project, pass the regional endpoints to `MixpanelAPI`: + US projects use the SDK's default host and need no change. For an EU or India project, pass the regional endpoints to `MixpanelAPI`: @@ -372,7 +382,7 @@ Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in- mixpanel.init(); ``` - For an EU or India project, pass the regional host as the third argument to `init()`: + US projects use the SDK's default host and need no change. For an EU or India project, pass the regional host as the third argument to `init()`: @@ -417,7 +427,7 @@ Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in- } ``` - For an EU or India project, pass `serverURL`: + US projects use the SDK's default host and need no change. For an EU or India project, pass `serverURL`: @@ -471,7 +481,7 @@ Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in- } ``` - For an EU or India project, set `serverURL` after initialization: + US projects use the SDK's default host and need no change. For an EU or India project, set `serverURL` after initialization: @@ -523,7 +533,7 @@ Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in- } ``` - For an EU or India project, set `serverURL` in `MixpanelOptions`: + US projects use the SDK's default host and need no change. For an EU or India project, set `serverURL` in `MixpanelOptions`: @@ -593,7 +603,7 @@ Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in- } ``` - For an EU or India project, set `serverURL` with `MixpanelOptions`: + US projects use the SDK's default host and need no change. For an EU or India project, set `serverURL` with `MixpanelOptions`: @@ -630,7 +640,7 @@ Mixpanel supports [EU](/docs/privacy/eu-residency) and [India](/docs/privacy/in- ![unity\_screenshots](https://user-images.githubusercontent.com/36679208/152408022-62440f50-04c7-4ff3-b331-02d3d3122c9e.jpg) - For an EU or India project, set **API Host Address** in the same settings menu to `https://api-eu.mixpanel.com/` or `https://api-in.mixpanel.com/`. + US projects use the SDK's default host and need no change. For an EU or India project, set **API Host Address** in the same settings menu to `https://api-eu.mixpanel.com/` or `https://api-in.mixpanel.com/`. Note: If you prefer to initialize Mixpanel manually, you can select the `Manual Initialization` in the settings and call `Mixpanel.Init()` to initialize.