setServerURL method

void setServerURL (
  1. String serverURL
)

Set the base URL used for Mixpanel API requests. Useful if you need to proxy Mixpanel requests. Defaults to https://api.mixpanel.com. To route data to Mixpanel's EU servers, set to https://api-eu.mixpanel.com

  • serverURL the base URL used for Mixpanel API requests

Implementation

void setServerURL(String serverURL) {
  if (Platform.isIOS) {
    if (_MixpanelHelper.isValidString(serverURL)) {
      _channel.invokeMethod<void>(
          'setServerURL', <String, dynamic>{'serverURL': serverURL});
    } else {
      developer.log('`setServerURL` failed: serverURL cannot be blank',
          name: 'Mixpanel');
    }
  }
}