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 bidirectionally, 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, go to Partner Integrations β†’ Amplitude.
  2. Click the "+" button to issue a new Amplitude 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 Audiences.


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 Audience to populate in Leanplum.


Leanplum will create missing users by default

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.

If you don't want Leanplum to create those users, you can uncheck the box "Create Profiles for Non-existing Users".


NOTE: When subsequent syncs are called, Amplitude only send the changes since last cohort sync

If the cohort had not changed at all, then subsequent sync(s) will result in no requests to Leanplum. Amplitude do not currently support a full sync from the beginning natively in the UI at this time.

If you want to do a full resync, there are 2 options:

  • Change the definition to be 0 users, sync, change it back, then sync again.
    This will remove all of the users in the first sync and then add them all back in the second sync
  • Make a copy of the cohort and sync that

Using Amplitude cohorts in Leanplum

Once you sync your Behavioral Cohorts, they will be available as Saved Audience 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 Audience tab in the campaign to select your audience.

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


Push notification

Sent, Open, Bounce, Held Back


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.


Session ID

The ID of the session associated with a particular event is not sent to Amplitude.

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 about a month 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.