Integration
Connect the SPLIO / D-AIM SDK to all of your website's features to start driving your users and build retention.
🚩 You have the D-ENGAGE sticker up and running.
Now you need to integrate the SDK deeper into your website so that your user can: - 🧠understand how the program works. - 🔎discover all the functionalities that you slaved away at developing ! - 🥕be rewarded for consistently using your application's main features.
Summary
To properly integrate our SDKs to your app, here are all the steps you have to think about :
User authentication
Interactions
User Properties
Navigation
I. User authentication
1. Login
Method: user.login(...)
user.login(...)
If the user already exists, connects him
If not, creates the account and connects him
Should be called right after you've logged in/registered a user to your own website.
Do not call this method on each page. ApmService keeps the user connected across pages through the use of localStorage
.
Return value
Example
Connecting user 'John Doe' with his email john.doe@mail.com
associated with the ID/token you gave him.
Did it work ?
The easiest way of verifying if a user is connected is to check inside the localStorage
if there is a key as d-engage-[
your partner id
]-user
3. Logout
Method: user.logout()
user.logout()
Logs a user out. This must be called when a user is logged out of your website. The SDK will revert to its non-connected state.
Example
II. Interactions
1. Send an interaction
Method: generosity.add(...)
generosity.add(...)
Tells our server that the user accomplished the given action after ApmService checks whether the user is allowed to do the action (frequency, filters, etc...).
The tags must match with the tagging plan established with our team.
Return value
Example
A tag may have multiple versions configured in our BackOffice. This is an unlikely scenario, but as an example, sending the same tag and properties 3 times may match with a different version each time.
3. User properties
Only necessary when using our filter functionality.
Method: userProperties.add(...)
, userProperties.remove(...)
userProperties.add(...)
, userProperties.remove(...)
Call these methods to update user properties. These user properties are stored permanently on a device (using localStorage
). The keys and values must match with the filters established inside our BackOffice.
Return value
The current userProperties
Example
4. Navigation
The following chapter concerns mainly ApmView.
You can handle navigation inside our modal through Deeplinks. These must follow the schema apm://{screen}/{arg?}
Available deeplinks :
Last updated