Set the path of the API server.


Set the email address of the developer. This prevents the email prompt from being displayed. Set a blank email to prevent Leanplum from being registered.


Sets whether Leanplum checks for and alerts about updates at startup in development mode (Default: true).


Sets the network timeout in seconds. (Default: 10).


Sets the request batching strategy. This applies to production mode only. The default behavior is to batch every 5 seconds.

Leanplum.setRequestBatching(false); // No batching.
Leanplum.setRequestBatching(true); // Batching enabled. Unsent requests are sent on start, pauseSession, resumeSession, and stop
Leanplum.setRequestBatching(true, 30); // Same as above except unsent requests are also sent every 30 seconds.

Sets a function for prompting the user for information. This is called to ask for an email address in development mode.

Leanplum.setPromptFunction(function(message, defaultValue, callback) {
  callback(prompt(message, defaultValue));

Enables development mode, and sets the app ID and client key.

Leanplum.setAppIdForDevelopmentMode('appId', 'clientKey');

Enables production mode, and sets the app ID and client key.

Leanplum.setAppIdForProductionMode('appId', 'clientKey');

Sets a custom device ID. If this is not called, Leanplum will assign a device ID automatically.


Sets the current version of your app.


Sets the device name to override the default.

Leanplum.setDeviceName("Andrew's iMac");

Sets the device model to override the default.


Sets the system name to override the default.

Leanplum.setSystemName('Mac OS X');

Sets the system version to override the default.