You can track user behaviour in your mobile application, record their activity, actions with products, orders, etc. Based on the obtained data, segment the base by customer or user activity, which will allow you to conduct marketing campaigns much more effectively.
With connected tracking you have access to such functions as:
Set up the mobile app according to the instructions: iOS
Connect the mobile app to enKod as instructed: привязка_приложения_в_enkod
To use the tracking functionality, you need to call the required method without initialising an instance of the class.
TrackerService.productAdd(Product())
TrackerService.productRemove(Product())
TrackerService.productLike(Product())
TrackerService.productDislike(Product())
The items added to the basket using the “productAdd” method are not applied in this case. The “items” field must be filled in for this method.
TrackerService.productBuy(Order())
TrackerService.productOpen(Product())
TrackerService.subscribe(Subscriber())
TrackerService.addExtrafields([String:Any])
TrackerService.pageOpen(String)
Subscriber structure:
public struct Subscriber { public var email: String? //обязательное public var phone: String? //необязательное public var firstName: String? //необязательное public var lastName: String? //необязательное public var groups: [Any]? //необязательное, массив с id групп рассылок и/или системными именами групп рассылок, которые должны быть присвоены подписчику при добавлении в платформу public var mainChannel: String? //необязательное, указывается в случае, если одновременно передается емейл и телефон (по умолчанию емейл) public var integrations: [Int64]? //необязательное public var extrafields: [String:Any]? //необязательное, список полей данных }
Order structure:
public struct Order { public var orderId: String? //необязательное, по умолчанию генерируется UUID public var items: [Product]? //обязательное public var sum: Float64? //необязательное public var price: Float64? //обязательное для модуля рекомендаций (если присутствует) public var count: Int64? //обязательное для модуля рекомендаций (если присутствует) public var fields: [String:Any]? //необязательное, передается любая дополнительная информацию по заказу }
Product structure:
public struct Product { public var id: String //обязательное public var count: Int64? //необязательное, по умолчанию 1 public var fields: [String:Any]? //необязательное, передается любая дополнительная информацию по товару }
Set up the mobile app according to the instructions: Android
Connect the mobile app to enKod according to the instructions: привязка_приложения_в_enkod
To use the tracking functionality, you need to call the required method without initialising an instance of the class.
Cart and favourites objects are initialised each time the application is launched.
The Product data class has the following structure:
data class Product( var id: String, //обязательное var groupId: String?, //обязательное для модуля рекомендаций (если присутствует) var count: Int?, //необязательное, по умолчанию 1 val fields: Map<String,Any>? //необязательное, передается любая дополнительная информацию по товару )
The Order data class has the following structure:
data class Order( var id: String?, //необязательное, по умолчанию генерируется UUID var items: ArrayList<Product>, //обязательное var sum: Float?, //необязательное var price: Float?, //обязательное для модуля рекомендаций (если присутствует) var count: Int?, //обязательное для модуля рекомендаций (если присутствует) var fields: Map<String, Any>? //необязательное, передается любая дополнительная информацию по заказу )
EnkodPushLibrary.ProductActions().AddToCart(Product())
EnkodPushLibrary.ProductActions().RemoveFromCart(Product())
EnkodPushLibrary.ProductActions().AddToFavourite(Product())
EnkodPushLibrary.ProductActions().RemoveFromFavourite(Product())
The items added to the basket using the “AddToCart” method are not applied in this case. The “items” field must be filled in for this method.
EnkodPushLibrary.ProductActions().ProductBuy(Order())
EnkodPushLibrary.ProductActions().ProductOpen(Product())
The SubscriberInfo data class has the following structure:
data class SubscriberInfo( val email: String?, //обязательное val phone: String?, //необязательное val firstName: String?, //необязательное val lastName: String?, //необязательное val groups: Array<Any>?, //необязательное, массив с id групп рассылок и/или системными именами групп рассылок, которые должны быть присвоены подписчику при добавлении в платформу val integrations: Array<Int>?, //необязательное val extrafields: HashMap<String,Any?>?, //необязательное, список полей данных val mainChannel: String? //необязательное, указывается в случае, если одновременно передается емейл и телефон (по умолчанию емейл) )
EnkodPushLibrary.Subscriber().Subscribe(SubscriberInfo())
EnkodPushLibrary.Subscriber().AddExtraFields(Map<String, Any>)
EnkodPushLibrary.Subscriber().PageOpen(String)