Android SDK

The Velocidi Android SDK is open-source and can be found at


Velocidi SDK is published to Maven central as a single module. Please reference the badge above or go to the release page to check our latest version.

To install the SDK in your application you just need to add the following dependency to the app/build.gradle file.

dependencies {
implementation 'com.velocidi:velocidi-android-sdk:0.2.0'

You also need to add the following permissions to ensure the good functioning of the SDK.

In your application AndroidManifest.xml:

<!-- Required for internet. -->
<uses-permission android:name="android.permission.INTERNET"/>

In your build.gradle file:

dependencies {
implementation ''

Setting up the SDK#

We highly recommend initializing the SDK on the onCreate method in your Application subclass. If you don't already have an Application subclass, you can also instantiate it in your MainActivity although it is not recommended.

class SampleApplication : Application() {
override fun onCreate() {
val config = Config(URL(""))
Velocidi.init(config, this)

You can also have a more granular control over the supported channels:

class SampleApplication : Application() {
override fun onCreate() {
val trackEndpoint = Channel(URL(""), true)
val matchEndpoint = Channel(URL(""), true)
val config = Config(trackEndpoint, matchEndpoint)
Velocidi.init(config, this)

Send a track event#

The track method allows you to collect user activity performed in your application. This method is expecting a tracking event with the event details. For more information check our documentation.

Velocidi.getInstance().track(PageView("MobileApp", "client1"))

It also accepts custom tracking events in a JSON format. Custom events should have type "custom" and a field "customType" with their custom event type:

val event =
"type": "custom",
"customType": "customType",
"siteId": "MobileApp",
"clientId": "client1"

Make a match#

The match method allows you to identify a user across multiple channels. Internally, the SDK is identifying a user based on its Advertising ID. By performing a match between an Advertising ID and your custom ID (e.g. e-mail hashes or CRM IDs), you are telling Velocidi CDP that these are the same user and all the information retrieved with either one of these IDs belongs to the same user.

// Match the device Advertising ID with the user email(
Velocidi.match("someProvider", listOf(UserId("eml", "")))

For more information our documentation section on Cross-Channel Matches

Available tracking events model classes#

  • AddToCart
  • AppView
  • OrderPlace
  • PageView
  • ProductClick
  • ProductCustomization
  • ProductFeedback
  • ProductImpression
  • ProductView
  • ProductViewDetails
  • RemoveFromCart
  • Search
Last updated on