Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel7

RelatedDigital SDK’sı uygulamanızdan kullanıcının hareketlerine göre veri toplamaya olanak sağlamaktadır.

Aşağıda bu amaç için tasarlanmış metotları ve detaylarını bulabilirsiniz.

...

Veri Gönderimi için herhangi bir modülün etkinleştirilmesine gerek yoktur. SDK’nın init edilmesi yeterlidir.

...

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.

Info

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

Info

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) mobil kanaldan gelen verilerin de bu referans ile gelmesine dikkat ediniz."that you use in your RMC account when sending data via mobile channel.

*KEY_ID: Uygulama sahibi tarafından müşterisinin tekilleştirilmesi için kullanılan id değerleridir. Bunlar It is the ID that you use to make a user unique in your system like CRM id, userId, customerId, accountId gibi farklı isimlerle ifade ediliyor olabilir.

exVisitorId yapınıza göre keyID veya E-Posta olabilir.

...

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

Signup

Kotlin

Code Block
languagekotlin
RelatedDigital.signUp(
  context = context,
  exVisitorId = "exVisitorIdDeğeriexVisitorIdValue"
)

Java

Code Block
languagejava
RelatedDigital.signUp(
  context,
  "exVisitorIdDeğeriexVisitorIdValue"
);

exVisitorId parametresi ile RMC panelinde kullanıcıyı tekilleştirmek için kullandığınız özellik gönderilmelidir. Örneğin, email

Info

...

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 ve and OM.sys.AppID push bildirimleri göndermek için gereklidir ve OM.sys.AppID parametresi RMC web panelinden alınabilirparameters. These parameters are necessary to send push notifications and can be gotten from the RMC panel.

Kotlin

Code Block
languagekotlin
val parameters = HashMap<String, String>()
parameters["OM.sys.TokenID"] = "tokenDeğeritokenValue"
parameters["OM.sys.AppID"] = "appAliasDeğeriappAliasValue"
RelatedDigital.signUp(
  context = context,
  exVisitorId = "exVisitorIdDeğeriexVisitorIdValue",
  properties = parameters
)

Java

HashMap<String
Code Block
language
java
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("OM.sys.TokenID", "tokenDeğeritokenValue");
parameters.put("OM.sys.AppID", "appAliasDeğeriappAliasValue");
RelatedDigital.signUp(
  context,
  "exVisitorIdDeğeriexVisitorIdValue",
  parameters
);

Oturum Açma

...

Login

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

Kotlin

Code Block
languagekotlin
RelatedDigital.login(
  context = context,
  exVisitorId = "exVisitorIdDeğeriexVisitorIdValue"
)

Java

Code Block
languagejava
RelatedDigital.login(
  context,
  "exVisitorIdDeğeriexVisitorIdValue"
);
Info

exVisitorId parametresi ile RMC panelinde kullanıcıyı tekilleştirmek için kullandığınız özellik gönderilmelidir. Örneğin, emailYou should send the value that you use to make a user unique on RMC panel with exVisitorId parameter. Example, email.

Kotlin

Code Block
languagekotlin
val parameters = HashMap<String, String>()
parameters["OM.sys.TokenID"] = "tokenDeğeritokenValue"
parameters["OM.sys.AppID"] = "appAliasDeğeriappAliasValue"
RelatedDigital.login(
  context = context,
  exVisitorId = "exVisitorIdDeğeriexVisitorIdValue",
  properties = parameters
)

Java

Code Block
languagejava
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("OM.sys.TokenID", "tokenDeğeritokenValue");
parameters.put("OM.sys.AppID", "appAliasDeğeriappAliasValue");
RelatedDigital.login(
  context,
  "exVisitorIdDeğeriexVisitorIdValue",
  parameters
);

Ayrıca, kullanıcıyı segmentlemenizi sağlayacak parametreleri de ekleyebilirsinizAlso, you can send information that can be used to segment the users.

Kotlin

val
Code Block
language
kotlin
val parameters = HashMap<String, String>()
parameters["OM.sys.TokenID"] = "tokenDeğeritokenValue"
parameters["OM.sys.AppID"] = "appAliasDeğeriappAliasValue"
parameters["OM.vseg1"] = "seg1Değeriseg1Value"
parameters["OM.vseg2"] = "seg2Değeriseg2Value"
parameters["OM.vseg3"] = "seg3Değeriseg3Value"
parameters["OM.vseg4"] = "seg4Değeriseg4Value"
parameters["OM.vseg5"] = "seg5Değeriseg5Value"
parameters["OM.bd"] = "1995-09-02"
parameters["OM.gn"] = "m"
parameters["OM.loc"] = "istanbul"
RelatedDigital.login(
  context = context,
  exVisitorId = "exVisitorIdDeğeriexVisitorIdValue",
  properties = parameters
)

Java

Code Block
languagejava
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("OM.sys.TokenID", "tokenDeğeritokenValue");
parameters.put("OM.sys.AppID", "appAliasDeğeriappAliasValue");
parameters.put("OM.vseg1", "seg1Değeriseg1Value");
parameters.put("OM.vseg2", "seg2Değeriseg2Value");
parameters.put("OM.vseg3", "seg3Değeriseg3Value");
parameters.put("OM.vseg4", "seg4Değeriseg4Value");
parameters.put("OM.vseg5", "seg5Değeriseg5Value");
parameters.put("OM.bd", "1995-09-02");
parameters.put("OM.gn", "m");
parameters.put("OM.loc", "istanbul");
RelatedDigital.login(
  context,
  "exVisitorIdDeğeriexVisitorIdValue",
  parameters
);

Sayfa Görüntüleme

...

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

Code Block
languagekotlin
val parameters = HashMap<String, String>()
RelatedDigital.customEvent(
  context = context,
  pageName = "SıkçaFrequently SorulanAsked SorularQuestions",
  properties = parameters
)

Java

Code Block
languagejava
HashMap<String, String> parameters = new HashMap<String, String>();
RelatedDigital.customEvent(
  context,
  "SıkçaFrequently SorulanAsked SorularQuestions",
  parameters
);

Ürün Görüntüleme

...

Product View

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

Kotlin

Code Block
languagekotlin
val parameters = HashMap<String, String>()
parameters["OM.pv"] = "Product Code" //Ürün Kodu
parameters["OM.pn"] = "Product Name" //Ürün İsmi
parameters["OM.ppr"] = "Product Price" //Ürün
Fiyatı
parameters["OM.pv.1"] = "Product Brand"
//Ürün markası
parameters["OM.inv"] = "Number of items in stock" //Stokta kaç
tane kaldığı
RelatedDigital.customEvent(
  context = context,
  pageName = "Product View",
  properties = parameters
)

Java

Code Block
languagejava
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("OM.pv", "Product Code"); //Ürün Kodu
parameters.put("OM.pn", "Product Name");
//Ürün İsmi
parameters.parameters.put("OM.ppr", "Product Price");
//Ürün Fiyatı
parameters.put("OM.pv.1", "Product Brand"); //Ürün
markası
parameters.put("OM.inv", "Number of items in stock"); //Stokta kaç tane kaldığı
RelatedDigital.customEvent(
  context,
  "Product View",
  parameters
);

Sepete Ekleme

Kullanıcının sepete ürün eklemesi veya çıkarması bilgisini göndermek için aşağıdaki customEvent metodunu kullanabilirsiniz.

...

Adding an Item to the Cart

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

Info

When the user removes the last item from the cart(basket), you should send OM.pb, OM.pu ve and OM.ppr parametrelerini boş string olarak göndermelisiniz. Örnekparameters with empty String. Example,

parameters["OM.pb"] = ""

parameters.put("OM.pb", "");

Kotlin

Code Block
languagekotlin
val parameters = HashMap<String, String>()
parameters["OM.pbid"] = "Basket ID" //Sepet ID si
parameters["OM.pb"] = "Product1Code;Product2Code" //Ürün1Kodu;Ürün2Kodu
parameters["OM.pu"] = "Product1Quantity;Product2Quantity"
//Ürün1Miktarı;Ürün2Miktarı
parameters["OM.ppr"] = "Product1Price*Product1Quantity;Product2Price*Product2Quantity"
//Ürün1Fiyatı*Ürün1Miktarı;Ürün2Fiyatı*Ürün2Miktarı
RelatedDigital.customEvent(
  context = context,
  pageName = "Cart",
  properties = parameters
)

Java

Code Block
languagejava
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("OM.pbid", "Basket ID"); //Sepet ID si
parameters.put("OM.pb", "Product1Code;Product2Code"); //Ürün1Kodu;Ürün2Kodu
parameters.put("OM.pu", "Product1Quantity;Product2Quantity");
//Ürün1Miktarı;Ürün2Miktarı
parameters.put("OM.ppr", "Product1Price*Product1Quantity;Product2Price*Product2Quantity");
//Ürün1Fiyatı*Ürün1Miktarı;Ürün2Fiyatı*Ürün2Miktarı
RelatedDigital.customEvent(
  context,
  "Cart",
  parameters
);

Satın Alma

...

Purchase

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

Kotlin

Code Block
languagekotlin
val parameters = HashMap<String, String>()
parameters["OM.tid"] = "Transaction ID" //İşlem ID'si
parameters["OM.pp"] = "Product1Code;Product2Code" //Ürün1Kodu;Ürün2Kodu
parameters["OM.pu"] = "Product1Quantity;Product2Quantity"
//Ürün1Miktarı;Ürün2Miktarı
parameters["OM.ppr"] = "Product1Price*Product1Quantity;Product2Price*Product2Quantity"
//Ürün1Fiyatı*Ürün1Miktarı;Ürün2Fiyatı*Ürün2Miktarı
RelatedDigital.customEvent(
  context = context,
  pageName = "Product Purchase",
  properties = parameters
)

Java

Code Block
languagejava
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("OM.tid", "Transaction ID"); //İşlem ID'si
parameters.put("OM.pp", "Product1Code;Product2Code");
//Ürün1Kodu;Ürün2Kodu
parameters.putparameters.put("OM.pu", "Product1Quantity;Product2Quantity");
//Ürün1Miktarı;Ürün2Miktarı
parameters.put("OM.ppr", "Product1Price*Product1Quantity;Product2Price*Product2Quantity");
//Ürün1Fiyatı*Ürün1Miktarı;Ürün2Fiyatı*Ürün2Miktarı
RelatedDigital.customEvent(
  context,
  Product Purchase",
  parameters
);

Kategori Görüntüleme

...

Category View

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

Kotlin

Code Block
languagekotlin
val parameters = HashMap<String, String>()
parameters["OM.clist"] = "Category Code/Category ID"
//Kategori Kodu/Kategori ID'si
RelatedDigital.customEventRelatedDigital.customEvent(
  context = context,
  pageName = "Category View",
  properties = parameters
)

Java

Code Block
languagejava
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("OM.clist", "Category Code/Category ID");
//Kategori Kodu/Kategori ID'si
RelatedDigital.customEvent(
  context,
  "Category View",
  parameters
);

Arama

...

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

Kotlin

Code Block
languagekotlin
val parameters = HashMap<String, String>()
parameters["OM.OSS"] = "Text Searched"
//Aranan Metin
parameters["parameters["OM.OSSR"] = "Number of Results"
//Sonuç Sayısı
RelatedDigital.customEvent(
  context = context,
  pageName = "Search",
  properties = parameters
)

Java

Code Block
languagejava
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("OM.OSS", "Text Searched");
//Aranan Metin
parameters.put("OM.OSSR", "Number of Results"); //Sonuç Sayısı
RelatedDigital.customEvent(
  context,
  "Search",
  parameters
);

Banner

...

Click

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

Kotlin

Code Block
languagekotlin
val parameters = HashMap<String, String>()
parameters["OM.OSB"] = "Banner Name/Banner Code"
//Banner İsmi/Banner Kodu
RelatedDigitalRelatedDigital.customEvent(
  context = context,
  pageName = "Banner Click",
  properties = parameters
)

Java

Code Block
languagejava
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("OM.OSB", "Banner Name/Banner Code");
//Banner İsmi/Banner Kodu
RelatedDigital.customEvent(
  context,
  "Banner Click",
  parameters
);

Favorilere Ekleme

Kullanıcının favorilerine ürün eklemesi bilgisini göndermek için aşağıdaki customEvent metodunu kullanabilirsinizYou can use the customEvent() method below when the user adds an item to his/her favorites.

Kotlin

Code Block
languagekotlin
val parameters = HashMap<String, String>()
parameters["OM.pf"] = "Product Code" //Ürün Kodu
parameters["OM.pfu"] = "1"
parameters["OM.pfr"] = "Product Price"
//Ürün Fiyatı
RelatedDigital.RelatedDigital.customEvent(
  context = context,
  pageName = "/om_evt.gif",
  properties = parameters
)

Java

Code Block
languagejava
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("OM.pf", "Product Code"); //Ürün Kodu
parameters.put("OM.pfu", "1");
//Ürün Kodu
parameters.put("OM.pfr", "Product Price"); //Ürün Fiyatı
RelatedDigital.customEvent(
  context,
  "/om_evt.gif",
  parameters
);
Info

Favorilere ürün eklendiğinde You should send "OM.pfu" değeri “1”; çıkarıldığında ise “-1” gönderilmelidir as “1” when an item is added to the favorites; whereas you should send it as “-1” when an item is removed from the favorites.

Info

Favorilere ürün eklendiğinde veya çıkarıldığında pageName parametresi You should send pageName parameter as "/om_evt.gif" şeklinde gönderilmelidir when an item is added to or removed from the favorites.

Favorilerden Çıkarma

Kullanıcının favorilerinden ürün çıkarması bilgisini göndermek için aşağıdaki customEvent metodunu kullanabilirsinizYou can use customEvent() method below when the user removes an item from his/her favorites.

Kotlin

Code Block
languagekotlin
val parameters = HashMap<String, String>()
parameters["OM.pf"] = "Product Code" //Ürün Kodu
parameters["OM.pfu"] = "-1"
parameters["OM.pfr"] = "Product Price" //Ürün Fiyatı
RelatedDigital.customEvent(
  context = context,
  pageName = "/om_evt.gif",
  properties = parameters
)

Java

HashMap<String
Code Block
languagejava
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("OM.pf", "Product Code");
//Ürün Kodu
parameters.put("OM.pfu", "-1"); //Ürün Kodu
parameters.put("OM.pfr", "Product Price");
//Ürün Fiyatı
RelatedDigital.customEvent(
  context,
  "/om_evt.gif",
  parameters
);
Info

Favorilere ürün eklendiğinde You should send "OM.pfu" değeri “1”; çıkarıldığında ise “-1” gönderilmelidir as “1” when an item is added to the favorites; whereas you should send it as “-1” when an item is removed from the favorites.

Info

Favorilere ürün eklendiğinde veya çıkarıldığında pageName parametresi You should send pageName parameter as "/om_evt.gif" şeklinde gönderilmelidir when an item is added to or removed from the favorites.

...

App Tracker

Uygulama Takibi özelliği kullanıcının cihazındaki App Tracker feature is for sending the list of the applications that were installed from Google Play Store, Amazon App Store ve and Huawei App Gallery ' den yüklenmiş (ve hala yüklü durumda olan) uygulamaların listesini göndermek içindir. Aşağıdaki sendTheListOfAppsInstalled metodunu uygulamanızın isteğinizin yerinden ve istediğiniz zaman aralığıyla çağırabilirsiniz (Örneğin, launcher activity içerisinden haftada birand 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

Code Block
languagekotlin
RelatedDigital.sendTheListOfAppsInstalled(
  context = context
)

Java

Code Block
languagejava
RelatedDigital.sendTheListOfAppsInstalled(
  context
);

Android , cihazda yüklü uygulamaların listesine erişmek için 2 seçenek sunmaktadır:

1-) Yüklü olup olmadığı bilgisi alınmak istenilen uygulamalar paket isimleriyle aşağıdaki gibi
AndroidManifest.xml dosyasına girilebilir.

...

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:

Code Block
languagexml
<manifest package="com.example.myApp">
    <queries>
        <package android:name="com.example.app1" />
        <package android:name="com.example.app2" />
    </queries>
    ...
</manifest>

2-) Tüm yüklü  uygulamaların listesini alabilmek için aşağıdaki izin AndroidManifest.xml
dosyasına eklenmek zorundadır.

...

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

Code Block
languagexml
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" 
tools:ignore="QueryAllPackagesPermission" />
Info

İkinci yöntemde Google Play Store ne için bu izne neden ihtiyaç duyulduğunun açıklanmasını bekleyebilirIn the second option, Google Play Store may expect you to explain why you need this permission.

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

Birinci yöntem herhangi bir izin gerektirmez.

Yukarıda belirtilen 2 yöntemden birisi uygulandıktan sonraFirst option does not require any permission.

After applying one of the 2 options above it is enough to call

RelatedDigital.sendTheListOfAppsInstalled( context = context )

çağırılması yeterlidir.

Lokasyon Durum Bilgisini Yollama

...

Sending Location Permission Status

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

Kotlin

Code Block
languagekotlin
RelatedDigital.sendLocationPermission(
  context = context
)

Java

Code Block
languagejava
RelatedDigital.sendLocationPermission(
  context
);
Info

Bu bilgi This information is sent with “OM.locpermit” parametresiyle beraber gönderilir ve aşağıdaki 3 değerden birini alabilir:and can have one of the 3 values below.

"always" : Lokasyon izni uygulama açıkken ve kapalıyken edinilmiş durumdaThe permission is granted even when the app is closed(background).

"appopen" : Lokasyon izni yalnızca uygulama açıkken edinilmiş durumdaThe permission is granted only when the app is open.

"none" : Lokasyon izni edinilmemiş durumdaThe permission is not granted at all.

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 parametresiyle gönderilmelidirparameter. The value of OM.sys.AppID parametresinin değeri RMC yönetim panelinden elde edilebilir. Bu linke gidiniz ve ilgili push uygulamasını seçiniz. Uygulama App Alias değeri 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 parametresinin değeri olarak gönderilmelidir. Sorun yaşarsanız lütfen RMC destek ekibiyle iletişime geçiniz.Aşağıdaki parametreleri yukarıda verilen eventlerin içinde gönderebilirsiniz. Birer örnekleri Oturum Açma ve Kaydolma adımlarında gösterilmiştirparameter. 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

Code Block
languagekotlin
parameters["OM.sys.TokenID"] = "tokenDeğeritokenValue"
parameters["OM.sys.AppID"] = "appAliasDeğeriappAliasValue" // Will be gotten from RMC panelden alınacaktırpanel

Java

Code Block
languagejava
parameters.put("OM.sys.TokenID", "tokenDeğeritokenValue");
parameters.put("OM.sys.AppID", "appAliasDeğeriappAliasValue"); // Will be gotten from RMC panelden alınacaktırpanel

...

Example Application

RelatedDigital Example Application