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.

In-app messages

In-App messages can appear at different points in your app experience, usually immediately or with some delay after a user triggers an event, state, or attribute change. Leanplum has several in-app message templates choose from, and you can customize your message's written content, colors, images, and more.

Start a new message

To get started, go to the Messaging dashboard and click Create Message. Click the In-App Message dropdown, then choose an in-app template.

Choose a template

There are several in-app message templates to choose from, including Alert, Center Popup, Confirm, Interstitial, Push Pre-Permission, and Web Interstitial. Each template has unique options and features, or you can create a custom template. Select one of the template options to see a preview of your message on the on-screen device at the left side of the composer.

Confirm. Two-button message. Best for interactions that require a choice, like "Yes/No," or "Confirm/Cancel." Note that confirm messages only track an event when a user selects the confirm (yes) option, not the dismiss button. See rich intersititals for a message with two button action events.

Center popup. Larger one-button message with more flexibility in design and message length than the alert message. Can include a background image, colored text, and supports different message sizes.

Alert. One-button message. Best for short, informative messages.

Push pre-permission. iOS only. A single-purpose lead-in message. Clicking OK always displays the iOS system-level push permissions prompt. Clicking Maybe Later will save the permissions prompt for another time.

Interstitial. Full-screen message with flexible design and interactivity.

Web interstitial. Full-screen message from the web that is opened in a web view. Similar to Interstitial.

Rich interstitial. Interstitial message with HTML compatibility and two buttons. Must have access to the Rich in-app messages feature. Talk to your CSM for more info.

  • Banner. Customizable banner at top of screen. Good for short messages that you don’t want to cover the center screen of your app. Must have access to the Rich in-app messages feature. Talk to your CSM for more info.

  • Star rating. A survey to gather quick feedback from your users. You can present a single question at any time about a product they bought, a new feature they tried, or a video they just watched. Must have access to the Rich in-app messages feature. Talk to your CSM for more info.

Or, create your own template

All of Leanplum’s in-app message templates are open-source and fully customizable, allowing you to create a message that matches the look and feel of your app. See more on how to create Custom in-app message templates.

Open source template designs

Open source templates are useful if you want to add additional message data fields such as "coupon percent to apply" or other custom elements.

Once you create a custom template, sync the template to your app in Leanplum by running a debug build on a registered developer device. You may also need to click the sync button in the Message Composer dashboard.

Your custom template will now appear in the dropdown menu when you select In App as your message type.

Compose the message

In the Compose section, add your Title and Message. For some In-App messages, you can change the font color of these elements.

Personalize the message

All messages can include dynamic elements, such as user attributes and event parameters, in the message copy, allowing you to deliver messages tailored to each unique person using your app. For more information on how to configure dynamic copy, see Personalize a message.

Customize the design

The look and feel of the Center Popup, Push Pre-Permission, and Interstitial in-app messages can be customized directly from the Leanplum Messaging dashboard in the Compose section. You can modify the following visual properties for these message types:

  • Title font color
  • Height and width (Center Popup only)
  • Message font color
  • Accept button font and background color
  • Dismiss button font background color (not available on Interstitial)
  • Background color and background image for entire message
  • Colors can be selected using the color picker tool, manually entering the rbga value, or entering a hex code into the color field.


See Personalize a message for more on adding user's names and other custom values to your message.

Just click the section you want to edit to make changes to the color, text, or images in your message.

As you fill in each field in the composer panel on the right, you can see an on-screen preview of your message on the left.

Always preview messages on a real device before sending — don't rely on the on-screen preview alone.Always preview messages on a real device before sending — don't rely on the on-screen preview alone.

Always preview messages on a real device before sending — don't rely on the on-screen preview alone.

Background image size

Our SDK does a lot of work behind the scenes to fit your uploaded image to the in-app message template on a wide array of devices. For Center Popup and Push Pre-Permission messages, that means fitting the entire image to the message template itself (the pop-up) with some shrinking or stretching. For Interstitials, however, it means fitting the image to the size of the device's screen. In this case, the image may be cropped to fit the user's screen.

To prevent cropping, we recommend using segments with your Interstitial background image to target different devices (and therefore screen sizes). This way, you can get the image to display perfectly on both iPhone and iPhone Plus, for example.

To add a segment to your background image setting:

  1. Hover over the background image label.
  2. Click the +.
  3. Create a segment by selecting Technology > Device model from the dropdown menu.
  4. Enter in the device you want to target for this image file (e.g. "iPhone 7").

Set button actions

The Accept action and Cancel action are what happens when the user clicks the "Accept" or "Cancel" buttons. You can edit the names of these buttons by editing the Accept and Cancel text in the Composer (replace "Cancel" with "No thanks," for example).

The default button action is "No Action," which simply dismisses the in-app message.

You can also set the button actions to "Open URL," "Register for Push," "Chain to a new message," and more.

Set in-app message delivery

In-app messages, unlike email or push notifications, cannot be sent immediately. When you setup an in-app message, you need to set the "Display when" criteria, which will determine when the message will be displayed.

You can think of these like setting an achievement or event. When a user reaches a certain point, or commits a certain action, they'll get the message. For example, in-app messages can be set to display when a user does something you've defined in our SDK (an Event), enters or exits a geolocation, or advances to a location (a State) in your app.


You can only use the Events and States that you have explicitly tracked via our SDK for "Display when" events. You cannot trigger an in-app message based on something on your server.

Available in-app message triggers:

  • User starts app
  • User starts or resumes app
  • User triggers event. Two options:
  • triggers: Send the message when the event occurs, regardless of parameter values
  • triggers when parameter: Send the message when the event occurs AND an event parameter is a certain value.


Note on parameters:

When in-app messages are associated with multiple different parameters of the same event, only one of those messages can be displayed at the time of the trigger event. See In-app message FAQ for more.

  • User advances to state. Two options:
  • triggers: Send the message when the State changes, regardless of parameter values
  • triggers when parameter: Send the message when the State change occurs AND a State parameter is a certain value.
  • User attribute changes. Three options:
  • changes: Send the message when a certain attribute changes, regardless of what it changes to, or from.
  • changes to: Send the message only when a user attribute changes to a certain value.
  • changes from/to: Send the message only when a user changes from a certain value (A) to another specified value (B).
  • User enters region
  • User exits region

Set Limits

You can limit how frequently, or how often, a message is displayed. See Limit how often a user can receive messages for more.

Test the message

The best way to test an in-app message is to check Active for test devices in the Message Composer, then click Send Preview. This lets you check that any jinja or personalized text in your message is working as intended.

Updated 4 months ago

In-app messages

Suggested Edits are limited on API Reference Pages

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