E-commerce events
Last updated
Last updated
This event signifies a user has submitted their payment information
Parameters (required and recommended)
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
Example
cact('trigger','add_payment_info', {
payment_method: 'card',
revenue: 16.00,
currency: 'EUR',
user: {
id: '12356',
email:'toto@domain.fr',
consent_categories: [1,3]
}
});
val event = TCAddPaymentInfoEvent("card")
event.revenue = 16.00f
event.currency = "EUR"
serverside.execute(event)
TCAddPaymentInfoEvent event = new TCAddPaymentInfoEvent("card");
event.revenue = 16.6f;
event.currency = "EUR";
serverside.execute(event);
TCAddPaymentInfoEvent *event = [[TCAddPaymentInfoEvent alloc] initWithId: @"ID";
event.revenue = [[NSDecimalNumber alloc] initWithFloat: 16.00f];
event.currency = @"EUR";
[TCS execute: event];
let event = TCAddPaymentInfoEvent(payementMethod: "card")
event?.revenue = 16.00
event?.currency = "EUR"
serverside?.execute(event)
var event = TCAddPaymentInfoEvent();
event.paymentMethod = "card";
event.revenue = 16.00;
event.currency = "EUR";
serverside.execute(event);
{
"event_name": "add_payment_info",
"payment_method": "card",
"revenue": 16.00,
"value": 22.53,
"currency": "EUR",
"user": {
"id": "12345",
"email": "toto@domain.fr",
"consent_categories": [
1,
3
]
}
}
This event signifies a user has submitted their shipping information.
Example
cact('trigger','add_shipping_info', {
value: 8.00,
currency: 'EUR',
coupon: 'promo',
shipping_tier: 'ups',
items: [{
id: 'SKU_12345',
quantity: 1,
variant: 'red',
coupon: 'CHRISTMAS',
discount: 1.99,
product:{
id: '12345',
name: 'Trex tshirt',
category_1: 'clothes',
category_2: 't-shirts',
category_3: 'boy',
brand: 'Lacoste',
price: 9.99
}
}],
user: {
id: '12356',
email:'toto@domain.fr',
consent_categories: [1,3]
}
});
val item1 = TCItem("my_product1_id", TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1)
val item2 = TCItem("my_product2_id", TCProduct("my_product_2_id", "my_product_2_name", 110f), 1)
val items = listOf<TCItem>(item1, item2)
val event = TCAddShippingInfoEvent(items, 112.5f, "EUR")
event.coupon = "promo"
event.shippingTier = "ups"
serverside.execute(event)
TCItem item1 = new TCItem("my_product1_id", new TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1);
TCItem item2 = new TCItem("my_product2_id", new TCProduct("my_product_2_id", "my_product_2_name", 25.6f), 1);
ArrayList<TCItem> items = new ArrayList<>(Arrays.asList(item1, item2));
TCAddShippingInfoEvent event = new TCAddShippingInfoEvent(items, 112.5f, "EUR");
event.coupon = "promo";
event.shippingTier = "ups";
serverside.execute(event);
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject: [[TCItem alloc] initWithItemId: @"iID1"
withProduct: [[TCProduct alloc] initWithProductId: @"pID1"
withName: @"pName1"
withPrice: [[NSDecimalNumber alloc] initWithString: @"1.5"]]
withQuantity: 1]];
[items addObject: [[TCItem alloc] initWithItemId: @"iID2"
withProduct: [[TCProduct alloc] initWithProductId: @"pID2"
withName: @"pName2"
withPrice: [[NSDecimalNumber alloc] initWithFloat: 2.5f]]
withQuantity: 2]];
TCAddShippingInfoEvent *event = [[TCAddShippingInfoEvent alloc] initWithItems: items
withValue: [[NSDecimalNumber alloc] initWithString: @"12.2"]
withCurrency: @"EUR"];
event.coupon = @"promo";
event.shippingTier = @"ups";
[TCS execute: event];
let item_1:TCItem = TCItem(itemId: "my_item1.id", with: TCProduct(productId: "my_product1.id", withName: "my_product1.name", withPrice: 12.5), withQuantity: 1)
let item_2:TCItem = TCItem(itemId: "my_item2.id", with: TCProduct(productId: "my_product2.id", withName: "my_product2.name", withPrice: 22.5), withQuantity: 1)
let event = TCAddShippingInfoEvent(items: [item_1, item_2], withValue: 1, withCurrency: "EUR")
event?.addAdditionalProperty("additionalKey", withBoolValue: true)
event?.coupon = "promo"
event?.shippingTier = "ups"
serverside?.execute(event)
TCProduct tc_product = TCProduct();
tc_product.ID = "product_1_ID";
tc_product.name = "product_1_name";
tc_product.price = 150;
tc_product.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_1 = TCItem();
tc_item_1.ID = "item_1_id";
tc_item_1.product = tc_product;
tc_item_1.quantity = 1;
tc_item_1.addAdditionalProperty("key_additional_item", "val_additional_product");
TCProduct tc_product_2 = TCProduct();
tc_product_2.ID = "product_2_ID";
tc_product_2.name = "product_2_name";
tc_product_2.price = 150;
tc_product_2.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_2 = TCItem();
tc_item_2.ID = "item_2_id";
tc_item_2.quantity = 2;
tc_item_2.product = tc_product;
tc_item_2.addAdditionalProperty("key_additional_item", "val_additional_product");
var event = TCAddShippingInfoEvent();
event.coupon = "promo";
event.shippingTier = "ups";
event.currency = "EUR";
event.items = [tc_item_1, tc_item_2];
serverside.execute(event);
{
"event_name": "add_shipping_info",
"shipping_tier": "Ground",
"revenue": 16.00,
"value": 22.53,
"currency": "EUR",
"items": [
{
"id": "SKU_12345",
"quantity": 1,
"price": 9.99,
"variant": "red",
"coupon": "CHRISTMAS",
"discount": 1.99,
"product": {
"id": "12345",
"name": "Trex tshirt",
"category_1": "clothes",
"category_2": "t-shirts",
"category_3": "boy",
"brand": "Lacoste",
"colors": [
"red"
],
"price": 9.99
}
},
{
"id": "SKU_12346",
"quantity": 1,
"price": 9.99,
"variant": "green",
"coupon": "CHRISTMAS",
"discount": 1.99,
"product": {
"id": "12346",
"name": "Heart tshirt",
"category_1": "clothes",
"category_2": "t-shirts",
"category_3": "girl",
"brand": "Jenyfion",
"colors": [
"blue",
"white"
],
"price": 9.99
}
}
],
"user": {
"id": "12345",
"email": "toto@domain.fr",
"consent_categories": [
1,
3
]
}
}
This event signifies that an item was added to a cart for purchase.
Parameters (required and recommended)
Example
cact('trigger','add_to_cart', {
value: 8.00,
currency: 'EUR',
items: [{
id: 'SKU_12345',
quantity: 1,
variant: 'red',
coupon: 'CHRISTMAS',
discount: 1.99,
product:{
id: '12345',
name: 'Trex tshirt',
category_1: 'clothes',
category_2: 't-shirts',
category_3: 'boy',
brand: 'Lacoste',
price: 9.99
}
}],
user: {
id: '12356',
email:'toto@domain.fr',
consent_categories: [1,3]
}
});
val item1 = TCItem("my_product1_id", TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1)
val item2 = TCItem("my_product2_id", TCProduct("my_product_2_id", "my_product_2_name", 110f), 1)
val items = listOf<TCItem>(item1, item2)
val event = TCAddToCartEvent(22.53f, "EUR", items)
serverside.execute(event)
TCItem item1 = new TCItem("my_product1_id", new TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1);
TCItem item2 = new TCItem("my_product2_id", new TCProduct("my_product_2_id", "my_product_2_name", 25.6f), 1);
ArrayList<TCItem> items = new ArrayList<>(Arrays.asList(item1, item2));
TCAddToCartEvent event = new TCAddToCartEvent(22.53f, "EUR", items);
serverside.execute(event);
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject: [[TCItem alloc] initWithItemId: @"iID1"
withProduct: [[TCProduct alloc] initWithProductId: @"pID1"
withName: @"pName1"
withPrice: [[NSDecimalNumber alloc] initWithFloat: 1.5f]]
withQuantity: 1]];
[items addObject: [[TCItem alloc] initWithItemId: @"iID2"
withProduct: [[TCProduct alloc] initWithProductId: @"pID2"
withName: @"pName2"
withPrice: [[NSDecimalNumber alloc] initWithFloat: 2.5f]]
withQuantity: 2]];
TCAddToCartEvent *event = [[TCAddToCartEvent alloc] initWithValue: [[NSDecimalNumber alloc] initWithString: @"12.2"]
withCurrency: @"EUR"
withItems: items];
[TCS execute: event];
let item_1:TCItem = TCItem(itemId: "my_item1.id", with: TCProduct(productId: "my_product1.id", withName: "my_product1.name", withPrice: 12.5), withQuantity: 1)
let item_2:TCItem = TCItem(itemId: "my_item2.id", with: TCProduct(productId: "my_product2.id", withName: "my_product2.name", withPrice: 22.5), withQuantity: 1)
let event = TCAddToCartEvent(value: 1, withCurrency: "EUR", withItems: [item_1, item_2])
event?.addAdditionalProperty("additionalKey", withBoolValue: true)
event?.currency = "EUR"
serverside?.execute(event)
TCProduct tc_product = TCProduct();
tc_product.ID = "product_1_ID";
tc_product.name = "product_1_name";
tc_product.price = 12.5;
tc_product.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_1 = TCItem();
tc_item_1.ID = "item_1_id";
tc_item_1.product = tc_product;
tc_item_1.quantity = 1;
tc_item_1.addAdditionalProperty("key_additional_item", "val_additional_product");
var event = TCAddToCartEvent();
event.currency = "EUR";
event.items = [tc_item_1];
event.value = 12.5;
serverside.execute(event);
{
"event_name": "add_to_cart",
"value": 8.00,
"currency": "EUR",
"items": [
{
"id": "SKU_12345",
"quantity": 1,
"price": 9.99,
"variant": "red",
"coupon": "CHRISTMAS",
"discount": 1.99,
"product": {
"id": "12345",
"name": "Trex tshirt",
"category_1": "clothes",
"category_2": "t-shirts",
"category_3": "boy",
"brand": "Lacoste",
"colors": [
"red"
]
}
}
]
}
The event signifies that an item was added to a wishlist. Use this event to identify popular gift items in your app.
Parameters (required and recommended)
Example
cact('trigger','add_to_wishlist', {
value: 8.00,
currency: 'EUR',
items: [{
id: 'SKU_12345',
quantity: 1,
variant: 'red',
coupon: 'CHRISTMAS',
discount: 1.99,
product:{
id: '12345',
name: 'Trex tshirt',
category_1: 'clothes',
category_2: 't-shirts',
category_3: 'boy',
brand: 'Lacoste',
price: 9.99
}
}],
user: {
id: '12356',
email:'toto@domain.fr',
consent_categories: [1,3]
}
});
val item1 = TCItem("my_product1_id", TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1)
val item2 = TCItem("my_product2_id", TCProduct("my_product_2_id", "my_product_2_name", 110f), 1)
val items = listOf<TCItem>(item1, item2)
val event = TCAddToWishlistEvent(items)
event.value = 20.00f
event.currency = "EUR"
serverside.execute(event)
TCItem item1 = new TCItem("my_product1_id", new TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1);
TCItem item2 = new TCItem("my_product2_id", new TCProduct("my_product_2_id", "my_product_2_name", 25.6f), 1);
ArrayList<TCItem> items = new ArrayList<>(Arrays.asList(item1, item2));
TCAddToWishlistEvent event = new TCAddToWishlistEvent(items);
event.value = 20.00f;
event.currency = "EUR";
serverside.execute(event);
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject: [[TCItem alloc] initWithItemId: @"iID1"
withProduct: [[TCProduct alloc] initWithProductId: @"pID1"
withName: @"pName1"
withPrice: [[NSDecimalNumber alloc] initWithFloat: 1.5f]]
withQuantity: 1]];
[items addObject: [[TCItem alloc] initWithItemId: @"iID2"
withProduct: [[TCProduct alloc] initWithProductId: @"pID2"
withName: @"pName2"
withPrice: [[NSDecimalNumber alloc] initWithFloat: 2.5f]]
withQuantity: 2]];
TCAddToWishlistEvent *event = [[TCAddToWishlistEvent alloc] initWithValue: [[NSDecimalNumber alloc] initWithString: @"12.2"]
withCurrency: @"EUR"
withItems: items];
[TCS execute: event];
let item_1:TCItem = TCItem(itemId: "my_item1.id", with: TCProduct(productId: "my_product1.id", withName: "my_product1.name", withPrice: 12.5), withQuantity: 1)
let item_2:TCItem = TCItem(itemId: "my_item2.id", with: TCProduct(productId: "my_product2.id", withName: "my_product2.name", withPrice: 22.5), withQuantity: 1)
let event = TCAddToWishlistEvent(items: [item_1, item_2])
event?.currency = "EUR"
serverside?.execute(event)
TCProduct tc_product = TCProduct();
tc_product.ID = "product_1_ID";
tc_product.name = "product_1_name";
tc_product.price = 150;
tc_product.addAdditionalProperty("key_additional_product", "val_additional_product");
TCItem tc_item_1 = TCItem();
tc_item_1.ID = "item_1_id";
tc_item_1.product = tc_product;
tc_item_1.quantity = 1;
tc_item_1.addAdditionalProperty("key_additional_item", "val_additional_product");
var event = TCAddToWishlistEvent();
event.addAdditionalPropertyWithIntValue("key_additional_1", 12);
event.addAdditionalPropertyWithListValue("key_additional_2", [12,12,12]);
event.currency = "EUR";
event.items = [tc_item_1];
event.value = 12.5;
serverside.execute(event);
{
"event_name": "add_to_wishlist",
"value": 8.00,
"currency": "EUR",
"items": [
{
"id": "SKU_12345",
"quantity": 1,
"price": 9.99,
"variant": "red",
"coupon": "CHRISTMAS",
"discount": 1.99,
"product": {
"id": "12345",
"name": "Trex tshirt",
"category_1": "clothes",
"category_2": "t-shirts",
"category_3": "boy",
"brand": "Lacoste",
"colors": [
"red"
]
}
}
]
}
This event signifies that a user has begun a checkout.
Parameters (required and recommended)
Example
cact('trigger','begin_checkout', {
id: 'O_12345',
coupon: 'CHRISTMAS',
revenue: 16.00,
value: 20.33,
currency: 'EUR',
user: {
id: '12356',
email:'toto@domain.fr'
},
items: [{
id: 'SKU_12345',
quantity: 1,
price: 9.99,
variant: 'red',
coupon: 'CHRISTMAS',
discount: 1.99,
product:{
id: '12345',
name: 'Trex tshirt',
category_1: 'clothes',
category_2: 't-shirts',
category_3: 'boy',
brand: 'Lacoste',
colors: ['red'],
price: 9.99
}
}, {
id: 'SKU_12346',
quantity: 1,
price: 9.99,
variant: 'green',
coupon: 'CHRISTMAS',
discount: 1.99,
product:{
id: '12346',
name: 'Heart tshirt',
category_1: 'clothes',
category_2: 't-shirts',
category_3: 'girl',
brand: 'Jenyfion',
colors: ['blue','white'],
price: 9.99
}
}]
})
val item1 = TCItem("my_product1_id", TCProduct("my_product_1_id", "my_product_1_name", 12.5f), 1)
val item2 = TCItem("my_product2_id", TCProduct(