Skip to content

feat(analytics): expose serverURL in Mixpanel.init()#245

Open
dt-stokkur wants to merge 1 commit into
mixpanel:mainfrom
Stokkur-Software:feat/expose-server-url-in-init
Open

feat(analytics): expose serverURL in Mixpanel.init()#245
dt-stokkur wants to merge 1 commit into
mixpanel:mainfrom
Stokkur-Software:feat/expose-server-url-in-init

Conversation

@dt-stokkur
Copy link
Copy Markdown

Adds an optional serverURL named parameter on Mixpanel.init() and forwards it to the native iOS, Android, macOS, and web SDKs at initialization time. Lets callers pin a proxy host or the EU endpoint without making a separate setServerURL call after init.

Adds an optional serverURL named parameter on Mixpanel.init() and
forwards it to the native iOS, Android, macOS, and web SDKs at
initialization time. Lets callers pin a proxy host or the EU endpoint
without making a separate setServerURL call after init.
@dt-stokkur dt-stokkur requested review from a team and jakewski May 27, 2026 17:25
@tylerjroach
Copy link
Copy Markdown
Contributor

Hi @lifeofnicolas Thanks for the PR. Will be taking a look.

Copy link
Copy Markdown
Contributor

@tylerjroach tylerjroach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an explicit null test. Other than that, the PR looks good! Lets get this up to date with the main branch and we can merge this in.

let superProperties = arguments["superProperties"] as? [String: Any]
self.token = token
let trackAutomaticEvents = arguments["trackAutomaticEvents"] as! Bool
let serverURLArg = arguments["serverURL"] as? String
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let serverURL = (arguments["serverURL"] as? String).flatMap { $0.isEmpty ? nil : $0 }

minor simplification to remove intermediate variable

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.

3 participants