Leanplum Connector Setup Guide

This article describes how to set up the Leanplum connector.

Connector Actions

Action Name AudienceStream EventStream
Set User Attributes
Send Message
Track Event

Configure Settings

Go to the Connector Marketplace and add a new connector. Read the Connector Overview article for general instructions on how to add a connector.

After adding the connector, configure the following settings:

Action Settings - Parameters and Options

Click Next or go to the Actions tab. This is where you configure connector actions.

This section describes how to set up parameters and options for each action.

Action - Set User Attributes

Parameters

Parameter Description
App ID
  • The application ID.
  • To find your application ID:
    • Select your application in the navigation column, and click Edit Apps.
    • Under Keys, click Show.
  • For more information on this endpoint, see: Leanplum’s documentation.
Client Key
  • The Production key for your Leanplum application.
API Version
  • The version of the Leanplum API to use.

    At time of publishing this version, the most recent version is 1.0.6.

| |User ID|
  • The current user ID.
  • Set to an email address or what you use at your company for user IDs.
  • Leave blank to use the device ID.
  • For more information, see: [Leanplum's documentation](https://docs.leanplum.com/reference#user-and-device-tracking>)
| |Create Disposition|
  • The policy that determines whether users are created by the API.
  • The default value for this method is **CreateIfNeeded**.
  • Possible values are:
    • **CreateIfNeeded** Creates a user with the given IDs if one does not already exist.
    • **CreateNever** Requires that the user already exists, otherwise the API call is skipped and a warning will be returned.
| |Dev Mode|
  • Whether the user is in Development mode (the caller is a developer and not a user).
  • Important for reporting purposes.
  • Value options are `true` or `false`.
  • Default Value: `false`.
| |User Attributes|
  • A map of user attributes as key-value pairs.
  • Each key must be a string.
  • Attributes are saved across sessions.
  • Only supplied attributes are updated.
  • If you omit an existing attribute, it will be preserved.
  • Example: `{"gender":"F","age":21}`.
| |User Attribute Values To Add|
  • A map of values to add to existing user attribute sets.
  • For example, supply `{"Interests":"Sports"}` to add Sports to the existing set of interests.
|

Action - Send Message

Parameters

Parameter Description
App ID
  • The application ID.
  • To find your application ID:
    • Select your application in the navigation column, and click Edit Apps.
    • Under Keys, click Show.
  • For more information on this endpoint, visit: Leanplum’s documentation.
Client Key
  • The Production key for your Leanplum App.
API Version
  • The version of the Leanplum API to use.

    At time of publishing this version, the most recent version is 1.0.6.

| |User ID|
  • The current user ID.
  • Set to an email address, or what you use at your company for user IDs.
  • Leave blank to use the device ID.
  • For more information, see: [Leanplum's documentation](https://docs.leanplum.com/reference#user-and-device-tracking).
| |Message ID|
  • The ID of the message, found in the URL when viewing a message.
  • For example: `[www.leanplum.com/dashboard#/{APP_ID}/messaging/{MESSAGE_ID](http://www.leanplum.com/dashboard#/{APP_ID}/messaging/{MESSAGE_ID)}`.
  • For more information on this endpoint, see: [Leanplum's documentation](https://docs.leanplum.com/reference#post_api-action-sendmessage).
| |Dev Mode|
  • Whether the user is in Development mode (the caller is a developer and not a user).
  • Important for reporting purposes.
  • Value options are `true` or `false`.
  • Default Value: `false`.
| |Device ID|
  • A unique ID for the device targeted by the call.
  • A `deviceID` and/or a `userID` is required.
  • For more information, see: [Leanplum's documentation](https://docs.leanplum.com/reference#user-and-device-tracking).
| |Create Disposition|
  • The policy that determines whether users are created by the API.
  • The default value for this method is **CreateIfNeeded**.
  • Possible values are:
    • **CreateIfNeeded** Creates a user with the given IDs if one does not already exist.
    • **CreateNever** Requires that the user already exists, otherwise the API call is skipped and a warning will be returned.
| |Force|
  • Whether to send the message regardless of whether the user meets the targeting criteria.
  • Value options are `true` or `false`.
  • Default Value: `false`.
| |Values|
  • A JSON object of key-value pairs to override Jinja values in the message.
|

Action - Track Event

Parameters

Parameter Description
App ID
  • To find your application ID:
    • Select your application in the navigation column, and click Edit Apps.
    • Under Keys, click Show.
  • For more information, see: Leanplum’s documentation.
Client Key
  • The Production key for your Leanplum application.
API Version
  • The version of the Leanplum API to use.

    At time of publishing this version, the most recent version is 1.0.6.

| |User ID|
  • The current user ID.
  • Set to an email address, or what you use at your company for user IDs.
  • Leave blank to use the device ID.
  • For more information, see: [Leanplum's documentation](https://docs.leanplum.com/reference#user-and-device-tracking).
| |Event|
  • The name of the event.
  • Use `Purchase` to identify a monetization event, with the event value being the revenue.
  • You can change the default monetization event name in Analytics by going to the metric chooser and clicking the **Monetization** metric category.
  • For more information, see: [Leanplum's documentation](https://docs.leanplum.com/reference#post_api-action-track)
| |Device ID|
  • A unique ID for the device targeted by the call.
  • A Device ID and/or a User ID is required.
  • For more information, see: [Leanplum's documentation](https://docs.leanplum.com/reference#user-and-device-tracking).
| |Dev Mode|
  • Whether the user is in Development mode (the caller is a developer and not a user).
  • Important for reporting purposes.
  • Value options are `true` or `false`.
  • Default Value: `false`.
| |Create Disposition|
  • The policy that determines whether users are created by the API.
  • The default value for this method is **CreateIfNeeded**.
  • Possible values are:
    • **CreateIfNeeded** Creates a user with the given IDs if one does not already exist.
    • **CreateNever** Requires that the user already exists, otherwise the API call is skipped and a warning will be returned.
| |Value|
  • The event value.
  • Example: For a purchase event, this would be the purchase price.
| |Currency Code|
  • The ISO 4217 currency code associated with value.
  • Leanplum automatically converts the value into your preferred currency, while retaining the original price and currency code as event parameters `localCurrency` and `localPrice`.
  • Currency conversion rates are updated every hour.
| |Info|
  • Any information attached to the event.
| |Time|
  • Option to provide the Unix timestamp for when the event occurred, which may be different from the current time.
| |Parameters|
  • Parameters as key-value pairs.
  • Each key must be a string, and up to 50 parameters may be set.
| |Message ID|
  • The message ID this event is associated with.
  • Set this to track a user's interaction with a message.
  • To track a message Send or a View, set the event argument to an empty string.
  • For other interactions, set the event argument to the type of action. Example values: `Open`, `Cancel`, `Accept`.
  • The Leanplum SDK does this automatically, so this should be used for advanced use cases only.
| |Disposition|
  • Determines how tracked events affect sessions and user activity.
  • If present, the disposition must have one of the following values:
    • `active`
      • This is the default value.
      • Used for events reflect user activity.
      • Active events should mark the user as active and should be tracked within a session.
      • Replaces the deprecated option `allowOffline: false`.
    • `passive`
      • Used for events that do not correspond to user activity.
      • These events do not need to occur within a session and do not mark a user as active.
      • Example: Sending a user a message would be tracked passively, since it affects a user, but does not represent user activity.
      • Replaces the deprecated option `allowOffline: true`.
    • `requireActive`
      • Used for events that must only be tracked within a session.
      • These events are rejected and return a warning response with `ignored: true` if the user does not have an active session.
      • Clients should detect the warning by the ignored field, as warning messages may change.
|

Was this page helpful?

This page was last updated: November 7, 2020