Android Visilabs Data Submission

In this page:


 

Visilabs uses events to collect data from Android apps. The developer must follow the methods provided by the SDK. customEvent is a general method for tracking user activities. customEvent takes 2 parameters: pageName and parameters.

  • pageName : Your app's current page. If your activity is not related to a page view, you must pass a value for the action taken. If you pass an empty string, the event is considered invalid and canceled.

  • parameters : A collection of key-values related to the event. Posting blank is acceptable if your event does not have additional data other than the page name.

In the SDK, besides customEvent, there are 2 other methods for collecting data: login and sign-up. As with the CustomEvent method, the sign-in and sign-up methods take a required and an optional parameter. The first parameter is exVisitorId, which uniquely identifies the user and cannot be blank. The second parameter, the parameters are optional.

In SDK, apart from customEvent, there are 2 other methods to collect data: login and signUp. As in the customEvent method, the login and signUp methods also take a mandatory and an optional parameter. The first parameter is exVisitorId which uniquely identifies the user and can not be empty. The second parameter properties is optional and passsing an empty dictionary also valid.

In order for your data from the mobile channel to be uploaded to RMC, please pay attention that whatever reference value you have used in your active RMC account (KEY_ID * or E-Mail) comes from the mobile channel with this reference.

*KEY_ID: These are the id values ​​used by the application owner to deduplicate the customer. These can be expressed with different names such as CRMid, userid, customerid, accountid.

ExVisitorId can be keyID or E-Mail depending on your structure.

Signup

Visilabs.CallAPI().signUp(exVisitorId: "userId/Email")

You can also pass additional information to optional parameter properties when the user registers. The following example shows calling the signUp method with properties containing the parameters OM.sys.TokenID and OM.sys.AppID. OM.sys.TokenID and OM.sys.AppID are required to send push notifications, and the OM.sys.AppID parameter can be obtained from the RMC web panel.

HashMap<String, String> parameters = new HashMap<>(); parameters.put("OM.sys.TokenID", token); parameters.put("OM.sys.AppID", AppAlias); //From RMC Panel Visilabs.callAPI().signUp(exVisitorId: "userId/Email", parameters)

Login

Like the Signup method, the login method can be called with or without optional parameter properties.

Visilabs.callAPI().login(exVisitorId: "userId/Email") HashMap<String, String> parameters = new HashMap<>(); parameters.put("OM.sys.TokenID", token); parameters.put("OM.sys.AppID", AppAlias); //From RMC Panel Visilabs.callAPI().login(exVisitorId: "userId/Email", parameters)

You can also add user segment parameters to the parameters.

Page View

To save the page name the visitor is currently viewing, use the customEvent method below. You can add extra parameters to the parameters or leave them blank.

Product View

Use the customEvent method below when the user views a product in the mobile app.

Add to Cart

When the user adds or removes a product to the cart, use the customEvent method below.

Purchase

Use the customEvent method below when the user purchases one or more items.

Category View

When the user views a category list page, use the customEvent method below.

Search

If the mobile app has a search function, use the customEvent method below.

Banner Click

You can track banner click data using the customEvent method below.

Adding to Favorites

When a user adds a product to their favorites, use the customEvent method below.

Removing from Favorites

When the user removes a product from their favorites, use the customEvent method below.

Send Campaign Parameters

After launching the application by clicking a push message, use the customEvent method below.

App Tracker

To use the App Tracker feature, simply call the following method from anywhere in your app and at any time interval (for example, once a week from within the launcher activity).

NOTE: In order to obtain a Visilabs Instance from Visilabs.CallAPI(), the Visilabs Instance must be created first with the Visilabs.CreateAPI() method. Pay attention to this when calling the above method.

Android offers 2 options to access the list of applications installed on the device:

1-) The applications that you want to get information about whether they are installed or not can be entered into the AndroidManifest.xml file with their package names as follows.

2-) In order to get the list of all installed applications, the following permission must be entered in the AndroidManifest.xml file.

In method 2, it can be expected to explain why this permission is needed for the Google Play Store.

https://developer.android.com/training/basics/intents/package-visibility

Method 1 does not require any permissions. It is sufficient to call the Visilabs.CallAPI().sendTheListOfAppsInstalled() method after applying one of these above 2 methods.

Sending Location Status Information

You can send the location permission status of your users to the server as follows and use this information on the panel later.

This information is sent with the OM.locpermit parameter and can take one of the following 3 values:

"always" : Location permission is obtained while the application is open and closed.

"appopen" : Location permission is only obtained when the app is open.

"none" : Location permission is not obtained.

Saving a Push Message Token

VVisilabs needs a token to send users push messages. The token value generated by Firebase / Huawei will be the value of key OM.sys.TokenID. The value of OM.sys.AppID can be obtained by the RMC administration panel. Follow the link https://intelligence.relateddigital.com/a02/index#/Push/AppList and select the relevant push application. Application App Alias value corresponds to OM.sys.AppID. If you run into problems, please contact the RMC support team.

You can send the following parameters in the events given above. Examples of each are shown in the Login and Signup steps.

 

Copyright 2020 Related Digital