Leanplum's user guides and developer documentation.

Leanplum Documentation

Leanplum's user guides, SDK setup, API docs, and more resources are here to help you get the most out of A/B testing, Campaigns, Messaging, and Analytics.

Amplitude integration

Amplitude provides product analytics to help companies understand user behaviours.

By using this integration, teams can leverage Amplitude's analytics capabilities with Leanplum's marketing automation tools to drive better audience engagement. The integration works by directionally, meaning marketers can either sync cohorts created in Amplitude to Leanplum where they will be available as saved audiences, or stream Leanplum specific marketing activity (e.g. Push Open) to Amplitude.

Contact your CSM if you are interested in using this integration.

🚧

User IDs must be at least 5 characters

This integration requires your user IDs to be at least 5 characters long.

e.g. "12345" will work, but "1234" will not work.

Setting up the audience integration between Leanplum and Amplitude

  1. From your Leanplum dashboard, select your name in the upper right corner to go to App Settings β†’ Keys & Settings for your app.
  2. Create your Amplitude API Key.
  3. Copy this Amplitude API Key and your App ID.
  1. Go to your Amplitude project β†’ Settings page. Paste your keys in the integration module as shown below and click Save. The status should now change to "Active".

Now, you'll be able to target and engage your Amplitude Behavioral Cohorts using Leanplum campaigns and A/B tests.

Syncing Amplitude cohorts with Leanplum segments

πŸ“˜

Make sure your users have a unique user ID set in Amplitude

The integration does not support anonymous users, so make sure all users you send to Leanplum have unique User IDs set in Amplitude. The integration will still work, but anonymous users will not be synced.

  1. Create a Behavioral Cohort in Amplitude
  2. To export to leanplum, click Export and select Leanplum as your destination. Now you can engage the users in your Behavioral Cohort through Leanplum.

🚧

Cohort names must be < 150 characters

The name of your Behavioral Cohorts in Amplitude must be 150 characters or less for them to be exportable to Leanplum.

You can configure your Amplitude Behavioral Cohorts to sync with Leanplum hourly or daily. You can also sync them manually as needed.

Once you sync your Amplitude Behavioral Cohort with Leanplum, it may take up to 20 minutes for the Saved Segment to populate in Leanplum.

πŸ“˜

Leanplum will create missing users

If there are users in your Amplitude cohort who do not exist in Leanplum, they will be created as new users. However, you may not be able to target them initially, because they will not have a device or email address on record.

Using Amplitude cohorts in Leanplum

Once you sync your Behavioral Cohorts, they will be available as Saved Segments in Leanplum. You'll be able to target these users with messaging campaigns, A/B tests, and more.

To target users in an Amplitude cohort, go to the + Segment dropdown to select your audience, then hover over Saved Segments to see you Amplitude Cohorts.

Export events from Leanplum to Amplitude

Leanplum can automatically export the following Leanplum events to your Amplitude project. All events will be tagged with the User ID and Device ID associated with the user at the time of the event.

Channel type

Events

Push notification

Sent, Open, Bounce, Held Back

Email

Send, Deferral, Delivered, Bounce, Open, Click, Marked as spam, Dropped, Unsubscribe, Held Back

In-app message

By template:
All templates β€” View, held back
Center Popup, Confirm, Interstitial β€” Accept
Rich interstitial β€” Select Button 1, Select Button 2
Satisfaction Survey β€” Submit
Banner β€” Select

A/B test

Impression event

Possible values for all events:

  • User ID β€” The user ID that triggered the event.
  • Device ID β€” The device ID that triggered the event.
  • Trigger time β€” The time in milliseconds at which the event was triggered. The time can be in the past if the triggering event occurred in the past.

Possible values for messages:

  • Message ID β€” The message ID that triggered the event.
  • Message event β€” The message event that triggered the event (e.g. Send, Open).
  • Message channel β€” The channel of the message (push, email, or in-app message).
  • Template name β€” The template name of the in-app message. Returns an empty string for non-in-app messages.
  • Parameters β€” All the parameters associated with the event when it is triggered. For example, an email’s Click event will include the URL clicked and the index of the URL. parameters are in JSON format, and all parameter values are URL encoded.

Possible A/B test event values (sent when the A/B test impression event occurs):

  • AB test ID β€” The ID of the A/B test the user entered into.
  • Variant ID β€” The ID of the variant group the user was sorted into.

Verify your events are showing up in Amplitude

Send yourself a test message in Leanplum to ensure the events are showing up in your Amplitude profile's Event Stream. See more on testing and previewing messages in Leanplum.

Reach out to your Customer Success Manager or Account Manager in order to get this integration enabled.

Updated 3 months ago


Amplitude integration


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.