Back

This article describes how to set up the LeanPlum connector in your Universal Data Hub account.

In this article:
Table of Contents Placeholder

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
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
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
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
Message ID
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
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
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
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: https://docs.leanplum.com/reference#post_api-action-track
Device ID
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.