Send an In-App message

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

Create your first message

For reaching users inside your app, there are several in-app messaging templates to choose from. Each offers unique options and features.

Choose a template

  • Alert: One-button message. Best for simple, short informative messages.
  • Center Popup: Larger one-button message. Same as above, but with more flexibility in design and message length.
  • Confirm: Two-button message. Best for slightly more complex interactions (two actions: accept or cancel).
  • Interstitial: Full-screen message. Best of both worlds - design flexibility and interactivity. 
  • 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.
  • Web Interstitial: Full-screen message from the web that is opened in a web view. Similar to Interstitial.

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.

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.

These message types allow the following visual properties to be modified:

  • Title font color
  • Layout height and width (Center Popup only)
  • Message font color
  • Accept button font and background color
  • Dismiss button font and background color (not available on Interstitial)
  • Background color
  • Background image for entire message

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 Pop-up 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.

Given this, 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 Actions

Accept and Cancel Actions are what happens after the user clicks "Accept" or "Cancel" buttons (which you can retitle) respectively. The default is "No Action" which simply dismisses the In-App message.

You can, however, choose to direct users to another in-app message. However, the most common technique is to send the user to a web or deeplink URL using the "Open URL" action.

Schedule

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 a milestone. 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.  

NOTE: You can only use Events and States that you have explicitly tracked via our SDK for "display when" criteria. 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:
    1. triggers: Send the message when the event occurs, regardless of parameter values
    2. triggers when parameter: Send the message when the event occurs AND an event parameter is a certain value.
  • User advances to state. Two options:
    1. triggers: Send the message when the State changes, regardless of parameter values
    2. triggers when parameter: Send the message when the State change occurs AND a State parameter is a certain value.
  • User attribute changes. Three options:
    1. changes: Send the message when a certain attribute changes, regardless of what it changes to, or from.
    2. changes to: Send the message only when a user attribute changes to a certain value.
    3. 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 how to limit the frequency of in-app messages.

 

More Options

Open source Templates: Make the designs your own

All of Leanplum’s in-app message templates are open-source and fully customizable, allowing you to display a message that matches the look and feel of your app. This is useful if you would like to add additional data fields such as "coupon percent to apply" or to further customize the template to match the native look and feel of your app.

For more information on how to customize an in-app message template, see our docs for both iOS and Android.

Once you have created a custom template, sync the template to your app in Leanplum by running a debug build on a registered developer device. Your custom template will now appear in the Message type drop-down menu in the message composer. The template will be labeled with whatever title you used within the custom template code. To use this message template, simply select it from the drop-down menu.

 


Was this article helpful?
Have more questions? Submit a request