Installation
This process needs to be followed only once, the first time you need to install the SDK in your project. Please refer to the Update section to see the instructions for subsequent updates.
-
In your gradle.properties, add this token:
authToken=jp_9ibcequhrjtge3cmavt2k4sq6a - In your settings.gradle or settings.gradle.kts, add the following lines:
- In your module’s build.gradle or build.gradle.kts file, add the following lines to create the dependency:
Initialization
Edit your custom
Application class and provide applicationContext for initialization.
Manifest.xml
Import
You can manually import the module at the beginning of your
MainActivity.kt
Usage
The SDK comes with 3 methods:
| method | loadtime |
|---|---|
show | First launch: 250ms |
| Next launches: 50-250ms | |
requestSize | 250ms |
track | 250ms |
Method 1: requestSize
This method allows to implement the logic of the CTA.
Logic schema
This schema explains how to update the CTA opening Kleep.
https://www.figma.com/board/BlurZ01lR3JBQZeTUU98TE/Mobile---CTA-Logic?node-id=0-1&t=ccXWciNziIdfhgew-1
Implementation example
Method 2: show
This method is called when the CTA is clicked. It allows to load the different screens. The developper integrating the SDK should embed them into a bottom sheet.
| parameter | priority | description |
|---|---|---|
| productID | required | You product ID |
| retailer | required | Name of the retailer |
| customerID | optional | CRM identifier, used for analytics |
| trackingID | optional | ID used by external tracking provider |
| stocks | optional | A map of item variant IDs to their stock status. |
true for in stock, false (by default) for out of stock, emptyMap or not specified to skip the check. |
Method 3: track
This method allows to track custom events.
| eventName | Trigger |
|---|---|
product_viewed | Upon PDP viewed |
product_added_to_cart | Upon product added to the cart |
checkout_completed | Upon order confirmation after the payment |
product_viewed
Untitled
Example
product_added_to_cart
Untitled
Example
checkout_completed
Untitled
Example
