Sending Data

RelatedDigital SDK provides collecting data according to interaction of the user with your application.

You can find the methods that are designed for this purpose below.

There is no need to enable any module to send data only. It is enough to initialize the SDK.

In order the data that you sent to be loaded to RMC panel correctly, you should use the same reference value (KEY_ID* veya E-Mail) that you use in your RMC account when sending data via mobile channel.

*KEY_ID: It is the ID that you use to make a user unique in your system like CRM id, userId, customerId, accountId.

exVisitorId value can be keyID or E-mail according to your structure.

Signup

Kotlin

RelatedDigital.signUp( context = context, exVisitorId = "exVisitorIdValue" )

Java

RelatedDigital.signUp( context, "exVisitorIdValue" );

You should send the value that you use to make a user unique on RMC panel with exVisitorId parameter. Example, email.

You can send additional information via this method. The example below shows the usage of signUp() method with OM.sys.TokenID and OM.sys.AppID parameters. These parameters are necessary to send push notifications and can be gotten from the RMC panel.

Kotlin

val parameters = HashMap<String, String>() parameters["OM.sys.TokenID"] = "tokenValue" parameters["OM.sys.AppID"] = "appAliasValue" RelatedDigital.signUp( context = context, exVisitorId = "exVisitorIdValue", properties = parameters )

Java

Login

You can call login() method with or without additional information like signUp() method.

Kotlin

Java

Kotlin

Java

Also, you can send information that can be used to segment the users.

Kotlin

Java

Page View

You can use the customEvent() method below to send the page name that the user is currently viewing.

You can put additional parameters to properties map or leave it empty.

Kotlin

Java

Product View

You can use customEvent() method below when the user views a product in your application.

Kotlin

Java

Adding an Item to the Cart

You can call the customEvent() method below when the user adds an item into the cart(basket).

Kotlin

Java

Purchase

You can use the customEvent() method below when the user make a purchase in your application.

Kotlin

Java

Category View

You can use the customEvent() method below when the user views a category page in your application.

Kotlin

Java

Search

You can use the customEvent() method below when the user makes a search in your application.

Kotlin

Java

Banner Click

You can use the customEvent() method when the user clicks on a banner in your application.

Kotlin

Java

Favorilere Ekleme

You can use the customEvent() method below when the user adds an item to his/her favorites.

Kotlin

Java

Favorilerden Çıkarma

You can use customEvent() method below when the user removes an item from his/her favorites.

Kotlin

Java

App Tracker

App Tracker feature is for sending the list of the applications that were installed from Google Play Store, Amazon App Store and Huawei App Gallery and are still installed in the device of the user. You can call the

sendTheListOfAppsInstalled() method below. It is up to you to determine how often you will call it and where in your code you will call it. (Example, in the launcher activity and once in a week).

Kotlin

Java

Android provides 2 options to access the list of the applications installed in the device.

1-) You can write the package names of the applications that you are interested in into AndroidManifest.xml file as below:

2-) In order to get the list of all applications installed in the device, you should add the permission below into AndroidManifest.xml file.

Sending Location Permission Status

You can call sendLocationPermission() method as below to send the location permission status for your application.

Kotlin

Java

Registering Push Message Token

It is required to have token information of the user to send push messages. The token value that can be gotten from Firebase or Huawei should be sent with OM.sys.TokenID parameter. The value of OM.sys.AppID parameter can be taken from RMC panel. Go to this link and click on your push application.

The value of App Alias there is the value that you should send with OM.sys.AppID parameter. If you have any trouble, please get in contact with the support team.

You can send the parameters below in the events described on this page. You can find examples of this in SignUp and Login sections above.

Kotlin

Java

Example Application

RelatedDigital Example Application

Copyright 2020 Related Digital