Skip to content

feat(mixpanel): add serverUrl and trackAutomaticEvents to init()#5104

Open
simbrams wants to merge 1 commit intodanielsogl:masterfrom
simbrams:feature/mixpanel-server-url-support
Open

feat(mixpanel): add serverUrl and trackAutomaticEvents to init()#5104
simbrams wants to merge 1 commit intodanielsogl:masterfrom
simbrams:feature/mixpanel-server-url-support

Conversation

@simbrams
Copy link

Summary

  • Exposes trackAutomaticEvents and serverUrl optional parameters on Mixpanel.init()
  • Enables EU data residency support by allowing a custom server URL (https://api-eu.mixpanel.com)
  • Adds successIndex/errorIndex to the @Cordova() decorator to correctly position callbacks

Dependency

Requires the corresponding change in the Cordova plugin: samzilverberg/cordova-mixpanel-plugin PR

Usage

// Default (US endpoint) - no change needed
this.mixpanel.init(token);

// EU data residency
this.mixpanel.init(token, true, 'https://api-eu.mixpanel.com');

Backward compatible

Both new parameters are optional. Existing code continues to work as before.

🤖 Generated with Claude Code

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>
@simbrams
Copy link
Author

simbrams commented Mar 5, 2026

Ready !
Dependency samzilverberg/cordova-mixpanel-plugin#140 was merged.

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