Install/Update differentiation
This is solely required for migration to MoEngage Platform. We need your help to tell the SDK whether the user is a new user for on your app or an existing user who has updated to the latest version.
If the user was already using your application and has just updated to a new version which has MoEngage SDK it is an updated call the below API
var moe = new MoECordova.init();
moe.setExistingUser(true);
In case it is a fresh install call the below API
var moe = new MoECordova.init();
moe.setExistingUser(false);
**This code should be done in your Application class and should be called only once
If this code is not added Smart Trigger InApp/Push Campaigns on INSTALL event will not work**
NOTE :
This should be called only once in application's lifetime and it should not be tied up to login or signup login logic.
Updated over 7 years ago
What’s Next