mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-04-13 00:00:10 +08:00
feat(mixpanel): add serverUrl and trackAutomaticEvents to init() (#5124)
* feat(mixpanel): add serverUrl and trackAutomaticEvents params to init() Expose the serverUrl parameter for EU data residency support and trackAutomaticEvents for Android. This requires the corresponding cordova-plugin-mixpanel update (samzilverberg/cordova-mixpanel-plugin). Usage: this.mixpanel.init(token, true, 'https://api-eu.mixpanel.com') Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: regenerate plugin readmes --------- Co-authored-by: Simon Brami <simon.brami@evy.eu> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,11 @@ declare let mixpanel: any;
|
||||
* .then(onSuccess)
|
||||
* .catch(onError);
|
||||
*
|
||||
* // For EU data residency, pass a custom server URL:
|
||||
* this.mixpanel.init(token, true, 'https://api-eu.mixpanel.com')
|
||||
* .then(onSuccess)
|
||||
* .catch(onError);
|
||||
*
|
||||
* ```
|
||||
* @classes
|
||||
* MixpanelPeople
|
||||
@@ -76,10 +81,15 @@ export class Mixpanel extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
*
|
||||
* @param token {string}
|
||||
* @param trackAutomaticEvents {boolean} optional, defaults to true (Android only)
|
||||
* @param serverUrl {string} optional, custom server URL for EU data residency (e.g. 'https://api-eu.mixpanel.com')
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
init(token: string): Promise<any> {
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
init(token: string, trackAutomaticEvents?: boolean, serverUrl?: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user