-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set serverURL
param (for EU Data Residency)
#121
Comments
This sounds nice but I don't have the time to try it out myself atm. cordova plugins can use some user input variables, documented here: you can add another variable for your server URL in the same way and then adjust android manifest file using one of the following: this plugin has an example for for ios it looks more tricky because this url needs to be set in-code (not in config like android) on the mixpanel instance after its initialized. |
🙏 for your investigation . I'll give it a shot 👍 |
Have you found a solution how to do it on iOS? |
@klemensz We moved away from this plugin, as the Mixpanel SDK is not updated and it's also not possible to override the IOS version, since the IOS SDK is packed in the code instead of installing it as a Cocoa pod. There were some major changes in the SDK so I would highly recommend to update. Nevertheless, it's fairly easy to implement this and we did for the plugin we use now (see merge request: https://github.com/houseninjadojo/capacitor-mixpanel/pull/8/files). The plugin is for Ionic Capacitor and not Cordova, though. |
@chvonrohr Thanks, I need the plugin for Capacitor anyway. So you suggest it's better to use https://github.com/houseninjadojo/capacitor-mixpanel instead? The features I need are:
|
I prefer Capacitor plugins, as they are bit more lightweight and additionally support PWA (what we don't need at the moment, but you never know ;)) Your needs are covered, as you wrote except the serverUrl. We hope our PR is merged soon, otherwise we propose this fork for the @capacitor/community and maintain it our selfs |
I don't think that you will get PWA support with Capacitor plugins because they usually only support Android and iOS platforms. Some Cordova plugins support a "browser" platform but this has become obsolete (with newer versions of Ionic and Cordova). I know it because we build for all three platforms (web/PWA, Android, iOS). The route that I went for PWA is to additionally include the mixpanel-browser library and then have platform checks in the code to either call the native or browser plugin. |
The good thing on capacitor is that it supports Android, IOS and PWAs. BTW: just tested and works. only difference for browser is, that you need to do |
Is it somehow possible to set the server URL as configuration of this plugin?
Mixpanel explains it in the Objective-C documentation like this:
See here: https://developer.mixpanel.com/docs/ios#eu-data-residency
For Android, I should be able to do it with
AndroidManifest.xml
adjustments:https://developer.mixpanel.com/docs/android#eu-data-residency
The text was updated successfully, but these errors were encountered: