General examples

View without content

  // Kotlin     
Bisko.event("View")
  // Java  
Bisko.Companion.event("View");
  // Swift
Bisko.event(eventType: "View")
  // Objective C
[Bisko eventWithEventType:@"View"];

View with content

  // Kotlin   
var content = JSONObject()
content.put("id","321321312")
content.put("name","Content Name")
content.put("type","Content Type")
content.put("description","Content Description")
content.put("category",arrayListOf("Category","Subcategory 1","Subcategory 2"))
content.put("imageUrl","http://content.image/url")
content.put("value","Content Value")
content.put("keywords",arrayListOf("Keyword 1","Keyword 2","Keyword 3"))
content.put("author","Content Author")
content.put("quantity",1)
    
Bisko.event("View",content)
  // Java  
JSONObject content = new JSONObject();  
content.put("id","321321312");  
content.put("name","Content Name");  
content.put("type","Content Type");  
content.put("description","Content Description");  
content.put("category",new ArrayList(Arrays.asList("Category","Subcategory 1","Subcategory 2")));  
content.put("imageUrl","http://content.image/url");  
content.put("value","Content Value");  
content.put("keywords",new ArrayList(Arrays.asList("Keyword 1","Keyword 2","Keyword 3")));  
content.put("author","Content Author");  
content.put("quantity",1);  
        
Bisko.Companion.event("View",content);
  // Swift
var content : [String:Any] = [
    "id": "321321312",
    "name": "Content Name",
    "type": "Content Type",
    "description": "Content Description",
    "category": [
        "Category",
        "Subcategory 1",
        "Subcategory 2"
    ],
    "imageUrl": "http://content.image/url",
    "value": "Content Value",
    "keywords": [
        "Keyword 1",
        "Keyword 2",
        "Keyword 3"
    ],
    "author": "Content Author",
    "quantity": 1
]
Bisko.event(eventType: "View", content: content)
  // Objective C
NSMutableDictionary *content = [[NSMutableDictionary alloc] init];
[content setObject:@"321321312" forKey:@"id"];
[content setObject:@"Content Name" forKey:@"name"];
[content setObject:@"Content Type" forKey:@"type"];
[content setObject:@"Content description" forKey:@"description"];
[content setObject:[NSArray arrayWithObjects:@"Category",@"Subcategory 1","Subcategory  2", nil] forKey:@"category"];[content setObject:@"http://content.image/url"  forKey:@"imageUrl"];[content setObject:@"Content Value" forKey:@"value"];[content    setObject:[NSArray arrayWithObjects:@"Keyword 1",@"Keyword 2","Keyword 3", nil]    forKey:@"keywords"];
[content setObject:@"Content Author" forKey:@"author"];
[content setObject:@1 forKey:@"quantity"];

[Bisko eventWithEventType:@"View" content:content]

View with content(HashMap<String,Any?>?)

  // Kotlin   
var content = hashMapOf<String,Any?>()  
content["id"] = "321321312"  
content["name"] = "Content Name"  
content["type"] = "Content Type"  
content["description"] = "Content Description"  
content["category"] = arrayListOf("Category","Subcategory 1","Subcategory 2")  
content["imageUrl"] = "http://content.image/url"  
content["value"] = "Content Value"  
content["keywords"] = arrayListOf("Keyword 1","Keyword 2","Keyword 3")  
content["author"] = "Content Author"  
content["quantity"] = 1  

Bisko.event("View",content)
  // Java  
HashMap<String, Object> content = new HashMap<>();  
content.put("id","321321312");  
content.put("name","Content Name");  
content.put("type","Content Type");  
content.put("description","Content Description");  
content.put("category",new ArrayList(Arrays.asList("Category","Subcategory 1","Subcategory 2"));  
content.put("imageUrl","http://content.image/url");  
content.put("value","Content Value");  
content.put("keywords",new ArrayList(Arrays.asList("Keyword 1","Keyword 2","Keyword 3"));  
content.put("author","Content Author");  
content.put("quantity",1);  

Bisko.Companion.event("View", content);

Article event examples

In this section you can find some example code snippets for saving events related with articles in Bisko

  // Kotlin   
var content = hashMapOf<String,Any?>()  
content["id"] = "1"  
content["name"] = "Apple releases new iPhone version"  
content["type"] = "article"  
content["description"] = "Applce, Inc, has released the newset iPhone version for the users. It contains major changes and new features."  
content["category"] = arrayListOf("Technology","Smartphone")  
content["imageUrl"] = "https://magazine.com/apple-iphone-releas"  
content["keywords"] = arrayListOf("apple","iphone","smartphone")  
content["author"] = "James Smith"  

Bisko.event("ArticleView",content)
  // Java  
HashMap<String, Object> content = new HashMap<>();  
content.put("id","1");  
content.put("name","Apple releases new iPhone version");  
content.put("type","article");  
content.put("description","Applce, Inc, has released the newset iPhone version for the users. It contains major changes and new features.");  
content.put("category",new ArrayList(Arrays.asList("Technology","Smartphone"));  
content.put("imageUrl","https://magazine.com/apple-iphone-releas");  
content.put("keywords",new ArrayList(Arrays.asList("apple","iphone","smartphone"));  
content.put("author","James Smith");  
    
Bisko.Companion.event("ArticleView", content);
  // Swift
var content : [String:Any] = [
    "id": "1",
    "name": "Apple releases new iPhone version",
    "type": "article",
    "description": "Applce, Inc, has released the newset iPhone version for the users. It contains  major changes and new features.",
    "category": [
        "Technology",
        "Smartphone"
    ],
    "imageUrl": "https://magazine.com/apple-iphone-release",
    "value": "Content Value",
    "keywords": [
        "apple",
        "iphone",
        "smartphone"
    ],
    "author": "James Smith"
]

Bisko.event(eventType: "ArticleView", content: content)
  // Objective C
NSMutableDictionary *content = [[NSMutableDictionary alloc] init];
[content setObject:@"1" forKey:@"id"];
[content setObject:@"Apple releases new iPhone version" forKey:@"name"];
[content setObject:@"article" forKey:@"type"];
[content setObject:@"Applce, Inc, has released the newset iPhone version for the users. It contains     major changes and new features." forKey:@"description"];
[content setObject:[NSArray arrayWithObjects:@"Technology",@"Smartphone", nil] forKey:@"category"];
[content setObject:@"https://magazine.com/apple-iphone-releas" forKey:@"imageUrl"];
[content setObject:[NSArray arrayWithObjects:@"apple",@"iphone","smartphone", nil] forKey:@"keywords"];
[content setObject:@"James Smith" forKey:@"author"];

[Bisko eventWithEventType:@"ArticleView" content:content];

You can use the value property to save the value which is related with the specific event. For example we can use it to save the comment by the user.

  // Kotlin   
var content = hashMapOf<String,Any?>()  
content["id"] = "1234"  
content["name"] = "Samsung releases new Galaxy Note version"  
content["type"] = "article"  
content["description"] = "Samsung has released the newset Galaxy Note version for the users. It contains major changes and new features."  
content["value"] = "Amazing news! The new Galaxy Note looks perfect!" // you can send the content of the comment through this property for example  
content["category"] = arrayListOf("Technology","Smartphone")  
content["imageUrl"] = "https://magazine.com/samsung-galaxy-note-release"  
content["keywords"] = arrayListOf("samsung","galaxy note","note","smartphone")  
content["author"] = "Nick Smith"  

Bisko.event("ArticleComment",content)
  // Java
HashMap<String, Object> content = new HashMap<>();  
content.put("id","1234");  
content.put("name","Samsung releases new Galaxy Note version");  
content.put("type","article");  
content.put("description","Samsung has released the newset Galaxy Note version for the users. It contains major changes and new features.");  
content.put("value","Amazing news! The new Galaxy Note looks perfect!");//you can send the content of the comment through this property for example  
content.put("category",new ArrayList(Arrays.asList("Technology","Smartphone"));  
content.put("imageUrl","https://magazine.com/samsung-galaxy-note-release");  
content.put("keywords",new ArrayList(Arrays.asList("samsung","galaxy note","note","smartphone"));  
content.put("author","Nick Smith");  

Bisko.Companion.event("ArticleComment", content);
  // Swift
var content : [String:Any] = [
    "id": "1234",
    "name": "Samsung releases new Galaxy Note version",
    "type": "article",
    "description": "Samsung has released the newset Galaxy Note version for the users. It contains  major changes and new features.",
    "value": "Amazing news! The new Galaxy Note looks perfect!", //you can send the content of the  comment through this property for example
    "category": [
        "Technology",
        "Smartphone"
    ],
    "imageUrl": "https://magazine.com/samsung-galaxy-note-release",
    "value": "Content Value",
    "keywords": [
        "samsung",
        "galaxy note",
        "note",
        "smartphone"
    ],
    "author": "Nick Smith"
]

Bisko.event(eventType: "ArticleComment", content: content)
  // Objective C
NSMutableDictionary *content = [[NSMutableDictionary alloc] init];
[content setObject:@"1234" forKey:@"id"];
[content setObject:@"Samsung releases new Galaxy Note version" forKey:@"name"];
[content setObject:@"article" forKey:@"type"];
[content setObject:@"Samsung has released the newset Galaxy Note version for the users. It contains     major changes and new features." forKey:@"description"];
[content setObject:@"Amazing news! The new Galaxy Note looks perfect!" forKey:@"value"];//you can send  the content of the comment through this property for example
[content setObject:[NSArray arrayWithObjects:@"Technology",@"Smartphone", nil] forKey:@"category"];
[content setObject:@"https://magazine.com/samsung-galaxy-note-release" forKey:@"imageUrl"];
[content setObject:[NSArray arrayWithObjects:@"samsung",@"galaxy note","note","smartphone", nil]    forKey:@"keywords"];
[content setObject:@"Nick Smith" forKey:@"author"];

[Bisko eventWithEventType:@"ArticleComment" content:content];

You can send additional properties as part of the content which can give extra information about the event. For example we can save number of words for the article as part of the article view event. You can name the custom paramters any way that you want and they have to be of type string.

  // Kotlin   
var content = hashMapOf<String,Any?>()  
content["id"] = "1234"  
content["name"] = "Samsung releases new Galaxy Note version"  
content["type"] = "article"  
content["description"] = "Samsung has released the newset Galaxy Note version for the users. It contains major changes and new features."  
content["category"] = arrayListOf("Technology","Smartphone")  
content["imageUrl"] = "https://magazine.com/samsung-galaxy-note-release"  
content["keywords"] = arrayListOf("samsung","galaxy note","note","smartphone")  
content["author"] = "Nick Smith"  
content["nrOfWords"] = "452" // custom property  
  
Bisko.event("ArticleView",content)
  // Java
HashMap<String, Object> content = new HashMap<>();  
content.put("id","1234");  
content.put("name","Samsung releases new Galaxy Note version");  
content.put("type","article");  
content.put("description","Samsung has released the newset Galaxy Note version for the users. It contains major changes and new features.");  
content.put("category",new ArrayList(Arrays.asList("Technology","Smartphone"));  
content.put("imageUrl","https://magazine.com/samsung-galaxy-note-release");  
content.put("keywords",new ArrayList(Arrays.asList("samsung","galaxy note","note","smartphone"));  
content.put("author","Nick Smith");  
content.put("nrOfWords","452");//custom property  
        
Bisko.Companion.event("ArticleView", content);
  // Swift
var content : [String:Any] = [
    "id": "1234",
    "name": "Samsung releases new Galaxy Note version",
    "type": "article",
    "description": "Samsung has released the newset Galaxy Note version for the users. It contains  major changes and new features.","value": "Amazing news! The new Galaxy Note looks perfect!", //you  can send the content of the comment through this property for example
    "category": [
        "Technology",
        "Smartphone",
    ],
    "imageUrl": "https://magazine.com/samsung-galaxy-note-release",
    "value": "Content Value",
    "keywords": [
        "samsung",
        "galaxy note",
        "note",
        "smartphone"
    ],
    "author": "Nick Smith",
    "nrOfWords": "452" //custom property
]

Bisko.event(eventType: "ArticleView", content: content)
  // Objective C
NSMutableDictionary *content = [[NSMutableDictionary alloc] init];
[content setObject:@"1234" forKey:@"id"];
[content setObject:@"Samsung releases new Galaxy Note version" forKey:@"name"];
[content setObject:@"article" forKey:@"type"];
[content setObject:@"Samsung has released the newset Galaxy Note version for the users. It contains major changes and new features." forKey:@"description"];
[content setObject:[NSArray arrayWithObjects:@"Technology",@"Smartphone", nil] forKey:@"category"];
[content setObject:@"https://magazine.com/samsung-galaxy-note-release" forKey:@"imageUrl"];
[content setObject:[NSArray arrayWithObjects:@"samsung",@"galaxy note","note","smartphone", nil]    forKey:@"keywords"];
[content setObject:@"Nick Smith" forKey:@"author"];
[content setObject:@452 forKey:@"nrOfWords"]; //custom property

[Bisko eventWithEventType:@"ArticleView" content:content]

Video event examples

In this section you can find some example code snippets for saving events related with videos in Bisko

  // Kotlin   
var content = hashMapOf<String,Any?>()  
content["id"] = "1"  
content["name"] = "SpaceX rocket launch"  
content["type"] = "video"  
content["description"] = "SpaceX lanunches a new rocket to the orbit."  
content["category"] = arrayListOf("Science","Aerospace")  
content["imageUrl"] = "https://magazine.com/spacex-rocket-launch"  
content["keywords"] = arrayListOf("spacex","orbit","nasa")  
content["author"] = "William Smith"  
  
Bisko.event("VideoView",content)
  // Java
HashMap<String, Object> content = new HashMap<>();  
content.put("id","1");  
content.put("name","SpaceX rocket launch");  
content.put("type","video");  
content.put("description","SpaceX lanunches a new rocket to the orbit.");  
content.put("category",new ArrayList(Arrays.asList("Science","Aerospace"));  
content.put("imageUrl","https://magazine.com/spacex-rocket-launch");  
content.put("keywords",new ArrayList(Arrays.asList("spacex","orbit","nasa"));  
content.put("author","William Smith"); 

Bisko.Companion.event("VideoView", content);
  // Swift
var content : [String:Any] = [
    "id": "1",
    "name": "SpaceX rocket launch",
    "type": "video",
    "description": "SpaceX lanunches a new rocket to the orbit.",
    "category": [
        "Science",
        "Aerospace",
    ],
    "imageUrl": "https://magazine.com/spacex-rocket-launch",
    "keywords": [
        "spacex",
        "orbit",
        "nasa"
    ],
    "author": "William Smith"
]

Bisko.event(eventType: "VideoView", content: content)
  // Objective C
NSMutableDictionary *content = [[NSMutableDictionary alloc] init];
[content setObject:@"1" forKey:@"id"];
[content setObject:@"SpaceX rocket launch" forKey:@"name"];
[content setObject:@"video" forKey:@"type"];
[content setObject:@"SpaceX lanunches a new rocket to the orbit." forKey:@"description"];
[content setObject:[NSArray arrayWithObjects:@"Science",@"Science", nil] forKey:@"category"];
[content setObject:@"https://magazine.com/spacex-rocket-launch" forKey:@"imageUrl"];
[content setObject:[NSArray arrayWithObjects:@"spacex",@"orbit","nasa", nil] forKey:@"keywords"];
[content setObject:@"William Smith" forKey:@"author"];

[Bisko eventWithEventType:@"VideoView" content:content];

Sending custom properties as part of the event:

  // Kotlin   
var content = hashMapOf<String,Any?>()  
content["id"] = "1"  
content["name"] = "SpaceX rocket launch"  
content["type"] = "video"  
content["description"] = "SpaceX lanunches a new rocket to the orbit."  
content["category"] = arrayListOf("Science","Aerospace")  
content["imageUrl"] = "https://magazine.com/spacex-rocket-launch"  
content["keywords"] = arrayListOf("spacex","orbit","nasa")  
content["author"] = "William Smith"  
content["length"] = "1023" // custom property  
content["serie"] = "SpaceX Launches" // custom property

Bisko.event("VideoView",content)
  // Java
HashMap<String, Object> content = new HashMap<>();  
content.put("id","1");  
content.put("name","SpaceX rocket launch");  
content.put("type","video");  
content.put("description","SpaceX lanunches a new rocket to the orbit.");  
content.put("category",new ArrayList(Arrays.asList("Science","Aerospace"));  
content.put("imageUrl","https://magazine.com/spacex-rocket-launch");  
content.put("keywords",new ArrayList(Arrays.asList("spacex","orbit","nasa"));  
content.put("author","William Smith");   
content.put("length","1023");  // custom property 
content.put("serie","SpaceX Launches");  // custom property

Bisko.Companion.event("VideoView", content);
  // Swift
var content : [String:Any] = [
    "id": "1",
    "name": "SpaceX rocket launch",
    "type": "video",
    "description": "SpaceX lanunches a new rocket to the orbit.",
    "category": [
        "Science",
        "Aerospace",
    ],
    "imageUrl": "https://magazine.com/spacex-rocket-launch",
    "keywords": [
        "spacex",
        "orbit",
        "nasa"
    ],
    "author": "William Smith",
    "length": "1023", //custom property
    "serie": "SpaceX Launches" // custom property
]

Bisko.event(eventType: "VideoView", content: content)
  // Objective C
NSMutableDictionary *content = [[NSMutableDictionary alloc] init];
[content setObject:@"1" forKey:@"id"];
[content setObject:@"SpaceX rocket launch" forKey:@"name"];
[content setObject:@"video" forKey:@"type"];
[content setObject:@"SpaceX lanunches a new rocket to the orbit." forKey:@"description"];
[content setObject:[NSArray arrayWithObjects:@"Science",@"Science", nil] forKey:@"category"];
[content setObject:@"https://magazine.com/spacex-rocket-launch" forKey:@"imageUrl"];
[content setObject:[NSArray arrayWithObjects:@"spacex",@"orbit","nasa", nil] forKey:@"keywords"];
[content setObject:@"William Smith" forKey:@"author"];
[content setObject:@"1023" forKey:@"length"]; // custom property
[content setObject:@"SpaceX Launches" forKey:@"serie"]; // custom property

[Bisko eventWithEventType:@"VideoView" content:content]

E-Commerce event examples

In this section you can find some example code snippets for saving events related with e-commerce in Bisko

  // Kotlin   
var content = hashMapOf<String,Any?>()  
content["id"] = "1"  
content["name"] = "Apple iPhone X, 64GB"  
content["type"] = "product"  
content["description"] = "IPhone X from Apple, 64GB of memory, Black."  
content["category"] = arrayListOf("Mobile","Smartphones")  
content["imageUrl"] = "https://image.com/iphone"  
content["keywords"] = arrayListOf("apple","iphone x","black")  
content["value"] = 954

Bisko.event("ProductView",content) 
  // Java
HashMap<String, Object> content = new HashMap<>();  
content.put("id","1");  
content.put("name","Apple iPhone X, 64GB");  
content.put("type","product");  
content.put("description","IPhone X from Apple, 64GB of memory, Black.");  
content.put("category",new ArrayList(Arrays.asList("Mobile","Smartphones"));  
content.put("imageUrl","https://image.com/iphone")  
content.put("keywords",new ArrayList(Arrays.asList("apple","iphone x","black"));  
content.put("value", 954);

Bisko.Companion.event("ProductView", content);
  // Swift
var content : [String:Any] = [
    "id": "1",
    "name": "Apple iPhone X, 64GB",
    "type": "product",
    "description": "IPhone X from Apple, 64GB of memory, Black.",
    "category": [
        "Mobile",
        "Smartphones",
    ],
    "imageUrl": "https://image.com/iphone",
    "keywords": [
        "apple",
        "iphone x",
        "black"
    ],
    "value": "954"
]

Bisko.event(eventType: "ProductView", content: content)
  // Objective C
NSMutableDictionary *content = [[NSMutableDictionary alloc] init];
[content setObject:@"1" forKey:@"id"];
[content setObject:@"Apple iPhone X, 64GB" forKey:@"name"];
[content setObject:@"product" forKey:@"type"];
[content setObject:@"IPhone X from Apple, 64GB of memory, Black." forKey:@"description"];
[content setObject:[NSArray arrayWithObjects:@"Mobile",@"Smartphones", nil] forKey:@"category"];
[content setObject:@"https://image.com/iphone" forKey:@"imageUrl"];
[content setObject:[NSArray arrayWithObjects:@"apple",@"iphone x","black", nil] forKey:@"keywords"];
[content setObject:@954 forKey:@"value"];

[Bisko eventWithEventType:@"ProductView" content:content]

If more information is needed to be collected, as shown in previous examples custom properties can be used.

  // Kotlin   
var content = hashMapOf<String,Any?>()  
content["id"] = "1"  
content["name"] = "Apple iPhone X, 64GB"  
content["type"] = "product"  
content["description"] = "IPhone X from Apple, 64GB of memory, Black."  
content["category"] = arrayListOf("Mobile","Smartphones")  
content["imageUrl"] = "https://image.com/iphone"  
content["keywords"] = arrayListOf("apple","iphone x","black")  
content["quantity"] = 2  
content["value"] = "1908"  
content["unitprice"] = "954" // custom property
content["currency"] = "EUR" // custom property  
content["brand"] = "Apple" // custom property  
content["variant"] = "Black 64GB" // custom property  
content["sku"] = "1299589" // custom property

Bisko.event("AddToCart",content)    
  // Java
HashMap<String, Object> content = new HashMap<>();  
content.put("id","1");  
content.put("name","Apple iPhone X, 64GB");  
content.put("type","product");  
content.put("description","IPhone X from Apple, 64GB of memory, Black.");  
content.put("category",new ArrayList(Arrays.asList("Mobile","Smartphones"));  
content.put("imageUrl","https://image.com/iphone")  
content.put("keywords",new ArrayList(Arrays.asList("apple","iphone x","black"));  
content.put("quantity",2);  
content.put("value","1908");  
content.put("unitprice","954"); // custom property
content.put("currency","EUR"); // custom property  
content.put("brand","Apple"); // custom property  
content.put("variant","Black 64GB"); // custom property  
content.put("sku","1299589"); // custom property

Bisko.Companion.event("AddToCart", content);
  // Swift
 var content : [String:Any] = [
    "id": "1",
    "name": "Apple iPhone X, 64GB",
    "type": "product",
    "description": "IPhone X from Apple, 64GB of memory, Black.",
    "category": [
        "Mobile",
        "Smartphones",
    ],
    "imageUrl": "https://image.com/iphone",
    "keywords": [
        "apple",
        "iphone x",
        "black"
    ],
    "value": "954",
    "quantity": 2,
    "value": "1908",
    "unitprice": "954", // custom property
    "currency": "EUR", // custom property
    "brand": "Apple", // custom property
    "variant": "Black 64GB", // custom property
    "sku": "1299589" // custom property
]

Bisko.event(eventType: "AddToCart", content: content)
  // Objective C
NSMutableDictionary *content = [[NSMutableDictionary alloc] init];
[content setObject:@"1" forKey:@"id"];
[content setObject:@"Apple iPhone X, 64GB" forKey:@"name"];
[content setObject:@"product" forKey:@"type"];
[content setObject:@"IPhone X from Apple, 64GB of memory, Black." forKey:@"description"];
[content setObject:[NSArray arrayWithObjects:@"Mobile",@"Smartphones", nil] forKey:@"category"];
[content setObject:@"https://image.com/iphone" forKey:@"imageUrl"];
[content setObject:[NSArray arrayWithObjects:@"apple",@"iphone x","black", nil] forKey:@"keywords"];
[content setObject:@2 forKey:@"quantity"];
[content setObject:@"1908" forKey:@"value"];
[content setObject:@"954" forKey:@"unitprice"]; // custom property
[content setObject:@"EUR" forKey:@"currency"]; // custom property
[content setObject:@"Apple" forKey:@"brand"]; // custom property
[content setObject:@"Black 64GB" forKey:@"variant"]; // custom property
[content setObject:@"1299589" forKey:@"sku"]; // custom property

[Bisko eventWithEventType:@"AddToCart" content:content]
  // Kotlin   
var content = hashMapOf<String,Any?>()  
content["id"] = "1"  
content["name"] = "Apple iPhone X, 64GB"  
content["type"] = "product"  
content["description"] = "IPhone X from Apple, 64GB of memory, Black."  
content["category"] = arrayListOf("Mobile","Smartphones")  
content["imageUrl"] = "https://image.com/iphone"  
content["keywords"] = arrayListOf("apple","iphone x","black")  
content["quantity"] = 2  
content["value"] = "1908"  
content["unitprice"] = "954" // custom property   
content["currency"] = "EUR" // custom property   
content["brand"] = "Apple" // custom property   
content["variant"] = "Black 64GB" // custom property   
content["sku"] = "1299589" // custom property   
content["orderId"] = "123587" // custom property

Bisko.event("Purchase",content)
  // Java
HashMap<String, Object> content = new HashMap<>();  
content.put("id","1");  
content.put("name","Apple iPhone X, 64GB");  
content.put("type","product");  
content.put("description","IPhone X from Apple, 64GB of memory, Black.");  
content.put("category",new ArrayList(Arrays.asList("Mobile","Smartphones"));  
content.put("imageUrl","https://image.com/iphone")  
content.put("keywords",new ArrayList(Arrays.asList("apple","iphone x","black"));  
content.put("quantity",2);  
content.put("value","1908");  
content.put("unitprice","954"); // custom property   
content.put("currency","EUR"); // custom property   
content.put("brand","Apple"); // custom property   
content.put("variant","Black 64GB"); // custom property   
content.put("sku","1299589"); // custom property   
content.put("orderId","123587"); // custom property

Bisko.Companion.event("Purchase", content);
  // Swift
var content : [String:Any] = [
    "id": "1",
    "name": "Apple iPhone X, 64GB",
    "type": "product",
    "description": "IPhone X from Apple, 64GB of memory, Black.",
    "category": [
        "Mobile",
        "Smartphones",
    ],
    "imageUrl": "https://image.com/iphone",
    "keywords": [
        "apple",
        "iphone x",
        "black"
    ],
    "quantity": 2,
    "value": "1908",
    "unitprice": "954", // custom property
    "currency": "EUR", // custom property
    "brand": "Apple", // custom property
    "variant": "Black 64GB", // custom property
    "sku": "1299589", // custom property
    "orderId": "123587" // custom property
]

Bisko.event(eventType: "Purchase", content: content)
  // Objective C
NSMutableDictionary *content = [[NSMutableDictionary alloc] init];
[content setObject:@"1" forKey:@"id"];
[content setObject:@"Apple iPhone X, 64GB" forKey:@"name"];
[content setObject:@"product" forKey:@"type"];
[content setObject:@"IPhone X from Apple, 64GB of memory, Black." forKey:@"description"];
[content setObject:[NSArray arrayWithObjects:@"Mobile",@"Smartphones", nil] forKey:@"category"];
[content setObject:@"https://image.com/iphone" forKey:@"imageUrl"];
[content setObject:[NSArray arrayWithObjects:@"apple",@"iphone x","black", nil] forKey:@"keywords"];
[content setObject:@2 forKey:@"quantity"];
[content setObject:@"1908" forKey:@"value"];
[content setObject:@"954" forKey:@"unitprice"]; // custom property
[content setObject:@"EUR" forKey:@"currency"]; // custom property
[content setObject:@"Apple" forKey:@"brand"]; // custom property
[content setObject:@"Black 64GB" forKey:@"variant"]; // custom property
[content setObject:@"1299589" forKey:@"sku"]; // custom property
[content setObject:@"123587" forKey:@"orderId"]; // custom property

[Bisko eventWithEventType:@"Purchase" content:content]

Events that are not directly related to e-commerce can be collected to:

  // Kotlin   
var content = hashMapOf<String,Any?>()  
content["type"] = "product"  
content["category"] = arrayListOf("Mobile","Smartphones")  
content["value"] = "samsung s10"  
  
Bisko.event("Search",content)
  // Java
HashMap<String, Object> content = new HashMap<>();  
content.put("type","product");  
content.put("category",new ArrayList(Arrays.asList("Mobile","Smartphones"));  
content.put("value","samsung s10");

Bisko.Companion.event("Search", content);
  // Swift
var content: [String: Any] = [
    "type": "product",
    "category": [
           "Mobile",
           "Smartphones"
       ],
    "value": "samsung s10"
]

Bisko.event(eventType: "Search", content: content)
  // Objective C
NSMutableDictionary *content = [[NSMutableDictionary alloc] init];
[content setObject:@"product" forKey:@"type"];
[content setObject:[NSArray arrayWithObjects:@"Mobile",@"Smartphones", nil] forKey:@"category"];
[content setObject:@"samsung s10" forKey:@"value"];

[Bisko eventWithEventType:@"Search" content:content];