In-app messages setup

Highly customizable pop-up modals for mobile app users when inside your app.

In-app messages are customizable and targeted messages that display to users while inside your mobile app. These do not require a subscription. You can promote your app's features, remind about events/discounts, and engage relevant users to perform actions like make purchases, rate your app, subscribe to push notification, enable location tracking, and more!

OneSignal provides both HTML and drag-and-drop editor capabilities with templates and code samples to get you started quickly.


Add our mobile SDK to your app

Add OneSignal's Mobile SDK to your app. In-App messages are not available for websites or with our Web SDK. This may require some developer assistance.

🔨

Developers: Mobile SDK setup guides

Follow our Mobile SDK setup docs to add our code to your mobile app.

If you are not a developer, see Manage Team Members to invite them as admins to your app and share this guide!

You can continue following the steps below to configure in-app messages while your developer sets up the SDK if they haven't already.


Segments & subscriptions

In-app messages do not have their own Subscription. Instead they are shown to users that have a mobile push subscription. However, unlike push notifications, in-app messages do not have a subscription status. This means that when you create Segments, the mobile push subscriptions that fit the segment criteria are eligible to receive the in-app message even if the push subscription is unsubscribed from push.

📘

In-app message segments

Segments used for in-app messages include both subscribed and unsubscribed mobile push subscriptions.

In-app sessions

When you set an in-app message live, it won't display to users until they start a new session. A new session happens when the app is opened after being out of focus (closed or in the background) for 30+ seconds. This is because in-app messages are evaluated by our SDK upon initialization. If you set the in-app message live while the app is already open (our SDK is already initialized), you will need to start a new session to see the message.

Also, the user must be in the audience before the new session. If they enter the segment during the same session, they will not get the message until the next session.

To clarify, these are the steps:

  1. You set the in-app message to go live.
  2. The user's mobile push subscription is in the segment and they do not have your app open.
  3. The user starts a new session (opens your app).
  4. The trigger conditions are satisfied.
  5. The user will see the in-app message. *If the message contains the Push Permission Prompt or Location Prompt click actions, they may not see the message if subscribed to push or opted-in to location tracking already.

Triggers

When the subscription is in the audience, they become eligible to receive the in-app message. You can then display it to the user based on certain conditions called Triggers.

There are 4 types of triggers:

  1. On app open - when the user opens the app.
  2. Session duration - x time after the user has opened the app.
  3. Duration since last in-app - x time after a previous in-app message was shown.
  4. Custom triggers - displayed using our SDK addTrigger(s) methods.

The first three options allow you to create and display the message without the need to write code while the custom trigger option requires the code to be set within the app before it can be triggered.

📘

In-app triggers

See our docs on In-App Triggers for details. If you want to use custom triggers, make sure to share this page with your developers!


Click actions

Each element within the message has "Click Actions" that can perform events such as prompting for push notification permissions or location permissions, adding tags, deep linking to a page or whatever you like!

📘

Click actions

See In-App Click Actions for details.

Developers, see Deep Linking if you want to setup deep links or already have deep links you want to use within your messages.

Lifecycle events & analytics

The OneSignal SDK provides a lot of methods to control your in-app message experience. This includes the trigger methods, pausing messages, handling custom click events, and following the display/dismiss lifecycle.

🔨

Developer reference

All of our SDK methods related to in-app messages can be found in our Mobile SDK reference.


Tutorials & examples

In-app messages provide a lot of functionality. To help understand common use cases, we have several guides available to get you started hassle-free.

Push & location permission prompting

Recommended All mobile app users need to opt-in to receive push notifications. The best strategy to ask unsubscribed users to subscribe/re-subscribe to push can be found here with in-app messages. Also, if your app uses location tracking, you can ask for permission to track location with in-app messages as well.

Increase app store ratings & setup surveys

In-App Messages are a great way to ask users to rate your app in the app store and gather data. These guide will navigate you on how to set that up with minimal to no code required.

Collect user data & promotions

Collect the email address and/or phone number or ask your users to try their luck on a Promo Wheel.

App version updates & tutorials

Inform your users when you have added new products or features to the application and show them on how to use it!

Technical use cases

If you have a specific use case, please let us know by contacting [email protected] and share those details. Common use cases we have seen are:


Design in-app

Use our pre-made templates or design your own with the drag-and-drop editor or HTML builder. And yes, we do support In-App Message Carousels!


2842

In-app message pre-built templates

👍

Send your in-app messages!

You should now be equipped with everything you need to know about in-app messages.

See our In-App guide to start designing and sending!