/
Data Submission

Data Submission

Related Digital uses events to collect data from iOS applications. While sending data, the customEvent method takes 2 parameters. These;

  • pageName: The current page of your application. If your event is not related to a page view, you must pass a value related to the action taken. If you pass an empty string, the event will be invalidated and aborted.

  • properties: A collection of activity-related key-values. Submitting a blank is acceptable if your event has no additional data other than the page name.

In SDK, besides customEvent, there are 2 more methods to collect data: login and register. Like the CustomEvent method, the login and signup methods take a mandatory and an optional parameter. The first parameter is exVisitorId, which uniquely identifies the user and cannot be blank. The second parameter properties are optional.

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

*KEY_ID: The id values used by the application owner to deduplicate its customer. These may be expressed by different names such as CRM id, userid, customerid, accountid.

Events

Signup

You should only send this event when the user registers in your application.

RelatedDigital.signUp(exVisitorId: "KEY_ID veya E-Mail")

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 OM.sys.TokenID and OM.sys.AppID parameters. OM.sys.TokenID and OM.sys.AppID are required to send push notifications and the OM.sys.AppID parameter can be retrieved from the RMC web panel.

var properties = [String:String]() properties["OM.sys.TokenID"] = "F7C5231053E6EC543B8930FB440752E2FE41B2CFC2AA8F4E9C4843D347E6A847" properties["OM.sys.AppID"] = "RelatedDigitalIOS" //Buraya kendi App Alias değerinizi gireceksiniz RelatedDigital.signUp(exVisitorId: "KEY_ID veya E-Mail", properties: properties)

Login

You should only send this event when the user is logged into your application.

RelatedDigital.login(exVisitorId: "KEY_ID veya E-Mail")
var properties = [String:String]() properties["OM.sys.TokenID"] = "F7C5231053E6EC543B8930FB440752E2FE41B2CFC2AA8F4E9C4843D347E6A847" properties["OM.sys.AppID"] = "RelatedDigitalIOS" //Buraya kendi App Alias değerinizi gireceksiniz RelatedDigital.login(exVisitorId: "KEY_ID veya E-Mail", properties: properties)
var properties = [String:String]() properties["OM.vseg1"] = "seg1val" // Visitor Segment 1 properties["OM.vseg2"] = "seg2val" // Visitor Segment 2 properties["OM.vseg3"] = "seg3val" // Visitor Segment 3 properties["OM.vseg4"] = "seg4val" // Visitor Segment 4 properties["OM.vseg5"] = "seg5val" // Visitor Segment 5 properties["OM.bd"] = "1995-09-02" // Birthday properties["OM.gn"] = "m" // Gender properties["OM.loc"] = "Artvin" // Location RelatedDigital.login(exVisitorId: "KEY_ID veya E-Mail", properties: properties)

Page View

You should send this event on pages (Homepage, My Account, etc.) where you have not sent any event (Product View, Category, Basket, etc.). You can add extra parameters to the properties or leave them blank.

RelatedDigital.customEvent("PAGE_NAME", properties: [String: String]())

Product View

properties["OM.pv"] = "12345" // The code of the product viewed by the user properties["OM.pn"] = "ABCDE" // The name of the product viewed by the user properties["OM.ppr"] = "123.45" // The price of the product viewed by the user properties["OM.pv.1"] = "XYZ" // The brand of the product viewed by the user properties["OM.inv"] = "10" // The remaining stock quantity of the product viewed by the user RelatedDigital.customEvent("Product View", properties: properties)

Basket Events

The OM.pbid value must be a unique value. It should not change at every basket event.

In the cart event, it should always be sent to the final state of the cart. All items in the cart must be sent at this event.

You must separate the products with semicolons.

When sending the price, the price of the product for one piece * should be calculated as the number added to the cart. For example, if the price of the product is 5 TL and if 2 items are added to the cart, it should be sent as 10.

You should send this event when the user adds a product to the cart, removes a product from the cart, updates a product in the cart, and when the cart is completely emptied. When the cart is completely emptied, you should send it with all other parameters empty except OM.pbid.

properties["OM.pbid"] = "ABCD-1234" //Sepet ID değeri properties["OM.pb"] = "123;456" // Product1 Code;Product2 Code properties["OM.pu"] = "2;4" // Product1 Quantity;Product2 Quantity properties["OM.ppr"] = "10;40" RelatedDigital.customEvent("Cart", properties: properties)

Purchase

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

When sending the price, the price of the product for one piece * should be calculated as the number purchased. For example, the price of the product should be 5 TL and if 2 pieces were purchased, it should be sent as 10.

var properties = [String:String]() properties["OM.tid"] = "oid-12345678" // Order ID/Transaction ID properties["OM.pp"] = "12345;23456" // Product1 Code;Product2 Code properties["OM.pu"] = "3;1" // Product1 Quantity;Product2 Quantity properties["OM.ppr"] = "376.47;23.50" // Product1 Price*Product1 Quantity;Product2 Price*Product2 Quantity RelatedDigital.customEvent("Purchase", properties: properties)

Category View

Kullanıcı bir kategori sayfasını görüntülediğinde, aşağıdaki customEvent uygulamasını kullanın.

properties["OM.clist"] = "123" // Category Code / ID RelatedDigital.customEvent("Category View", properties: properties)

Search

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

properties["OM.OSS"] = "Telefon" // Search Keyword properties["OM.OSSR"] = "12345" // Number of Search Results RelatedDigital.customEvent("Search", properties: properties)

Banner Click

You can monitor banner click data using the customEvent app below.

properties["OM.OSB"] = "123" // Banner Name/Banner Code RelatedDigital.customEvent("Banner Click", properties: properties)

Add to Favorites

When user favorites a product, use the customEvent implementation below.

var properties = [String:String]() properties["OM.pf"] = "12345" // Product Code properties["OM.pfu"] = "1" properties["OM.pfr"] = 125.49" // Product Price RelatedDigital.customEvent("/om_evt.gif", properties: properties)

Remove from Favorites

When the user removes an item from their favourites, use the customEvent implementation below.

var properties = [String:String]() properties["OM.pf"] = "12345" // Product Code properties["OM.pfu"] = "-1" properties["OM.pfr"] = 125.49" // Product Price RelatedDigital.customEvent("/om_evt.gif", properties: properties)

Sending Campaign Parameters

After starting the application by clicking on a push message, use the customEvent below.

var properties = [String:String]() properties["utm_source"] = "Related-Digital" // utm_source value in the payload of push notification properties["utm_medium"] = "push" // utm_medium value in the payload of push notification properties["utm_campaign"] = "related_digital_campaign" // utm_campaign value in the payload of push notification RelatedDigital.sendCampaignParameters(properties: properties)

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.

RelatedDigital.sendLocationPermission()

This information 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.

Save Push Message Token

var properties = [String:String]() properties["OM.sys.TokenID"] = "F7C5231053E6EC543B8930FB440752E2FE41B2CFC2AA8F4E9C4843D347E6A847" // Token ID to use for push messages properties["OM.sys.AppID"] = "RelatedDigitalIOS" //App ID to use for push messages RelatedDigital.customEvent("RegisterToken", properties: properties)

 

Copyright 2020 Related Digital