In-app messages setup
Highly customizable pop-up modals for mobile app users when inside your app.
In-app messages (IAMs) are customizable and targeted messages that are displayed in your mobile app. They show to all users within your targeted segment and do not require any subscriptions. You can promote new app features, remind about events/discounts, and engage relevant users to perform actions like make purchases, rate your app, subscribe to push notifications, 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:
- You set the in-app message to go live.
- The user's mobile push subscription is in the segment and they do not have your app open.
- The user starts a new session (opens your app).
- The trigger conditions are satisfied.
- 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:
- On app open - when the user opens the app.
- Session duration - x time after the user has opened the app.
- Duration since last in-app - x time after a previous in-app message was shown.
- 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.
- Prompt for Push Permissions
- Example: Location Permissions - requires developer assistance to include location tracking permissions within app.
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.
- Example: Ask for App Store Rating
- Example: Create A Survey
- HTML Template Examples: Survey Feedback and Survey Multiple Choice
Collect user data & promotions
Collect the email address and/or phone number or ask your users to try their luck on a Promo Wheel.
- HTML Template Examples: Email & Phone Number Collection and 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:
- Example: Trigger In-App Message from Push Open
- Example: Trigger In-App Message after closing an In-App Message
- Example: Target Certain Android Manufacturers and Devices
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!
- Design In-App Messages with Drag and Drop - No code solution to create beautiful messages.
- Design In-App Messages with HTML - For the coders that want more control, use HTML and our In-App JS Library to create your own. In-App Message HTML Templates are available to get you started.
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!
Updated 8 days ago