Integration
Connect the SPLIO / D-AIM SDK to all of your website's features to start driving your users and build retention.
Last updated
Connect the SPLIO / D-AIM SDK to all of your website's features to start driving your users and build retention.
Last updated
Web Integration
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.
To properly integrate our SDKs to your app, here are all the steps you have to think about :
User authentication
Interactions
User Properties
Navigation
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.
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
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
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.
Only necessary when using our filter functionality.
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
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 :