InApp NATIV
In-App Messaging are custom views which you can send to a segment of users to show custom messages or give new offers or take to some specific pages. They can be created from your MoEngage account.

How to show In-App Message?
To show In-app Messaging, add the code below (this is required only for iOS) :
var moe = new MoECordova.init();
moe.showInApp();
In-App Messaging Rules
We use the following rules while showing the In-App:
-
Min delay before showing next in-app. This comes as a property from the server, and configurable under Settings > InApp Nativ in the MoEngage dashboard. Default is set to 15 mins. If min delay has crossed go to next step, else return.
-
If in-app has not expired, go to next step. If it has expired, repeat the same step for next InApp from the array.
-
If the delay (interval) between the same in-app has passed, go to next step. If not then repeat from Step 2 for next InApp from the array.
-
If the in-app is already clicked. —> Check if it’s a persistent in-app, if yes, continue to point5, if no, check if Primary Widget is already clicked. If already clicked, repeat from Step 2 for next InApp from the array.
-
Check for max no. of times inApp can be shown. If max no. of times is not crossed show the inApp, or else repeat from Step 2 for next InApp from the array.
Callback in JavaScript on In-App Click
To get a callback in javascript on in-app click you need to register for a click listener as shown below.
Minimum Plugin version required : 3.0.0
var moe = new MoECordova.init();
moe.on('onInAppClick', function(data) {
//add navigation logic here
});
Updated over 5 years ago