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. The SDK is distributed through a private Cloudsmith Maven repository.
1
Add your Cloudsmith credentials
In your Replace
local.properties, add the credentials provided by Kleep:local.properties
TOKEN_VALUE with the token provided by Kleep. The username is the literal string token.2
Add the Cloudsmith Maven repository
In your
settings.gradle or settings.gradle.kts, add the following lines:3
Add the dependency
In your module’s
build.gradle or build.gradle.kts file, add the following lines to create the dependency:Legacy installation (JitPack)
Legacy installation (JitPack)
These instructions apply to older SDK versions distributed through JitPack.
-
In your
gradle.properties, add this token:authToken=jp_9ibcequhrjtge3cmavt2k4sq6a -
In your
settings.gradleorsettings.gradle.kts, add the following lines: -
In your module’s
build.gradleorbuild.gradle.ktsfile, 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 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.
Method 3: track
This method allows to track custom events.
product_viewed
Parameters (CSV)
Example
product_added_to_cart
Parameters (CSV)
Example
checkout_completed
Parameters (CSV)
Example
