Introduction
For each event, there is some properties required.
In any cases, the property event_name
is required.
In this section you can find the list of all our standard events, with the list of standard properties required or not.
If the event type or the properties you're looking for aren't mentioned in this section, you still can send custom events and custom properties. But the property event_name
remains required.
Here are the most used events:
add_payment_info
This event signifies a user has submitted their payment information
Parameters (required and recommended)
Name
Type
Required
Example Value
Description
The chosen method of payment (see list of possible values below)
{
id: '12345',
email: 'toto@domain.fr',
consent_categories: [1,3]
}
consent_categories
is the user's consents list and is mandatory to manage consents. It is automatically filled from web sources if you use Commanders Act CMP.
You should also add all user's properties in this user object, especially reconciliation key (id, email).
Coupon code used for a purchase.
Revenue (shipping price and taxes excluded ) after discount.
() revenue
is typically required for meaningful reporting.
( )currency
is required if you set revenue
.
Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.
(*) If you supply the revenue
parameter, you must also supply the currency
parameter so revenue metrics can be computed accurately.
Example
JavaScript Kotlin (Android) Java (Android) Objective-C (iOS) Swift (iOS) Dart (Flutter) json
Copy cact('trigger','add_payment_info', {
payment_method: 'card',
revenue: 16.00,
currency: 'EUR',
user: {
id: '12356',
email:'toto@domain.fr',
consent_categories: [1,3]
}
});
Copy val event = TCAddPaymentInfoEvent("card")
event.revenue = 16.00f
event.currency = "EUR"
serverside.execute(event)
Copy TCAddPaymentInfoEvent event = new TCAddPaymentInfoEvent("card");
event.revenue = 16.6f;
event.currency = "EUR";
serverside.execute(event);
Copy TCAddPaymentInfoEvent *event = [[TCAddPaymentInfoEvent alloc] initWithId: @"ID";
event.revenue = [[NSDecimalNumber alloc] initWithFloat: 16.00f];
event.currency = @"EUR";
[TCS execute: event];
Copy let event = TCAddPaymentInfoEvent(payementMethod: "card")
event?.revenue = 16.00
event?.currency = "EUR"
serverside?.execute(event)
Copy var event = TCAddPaymentInfoEvent();
event.paymentMethod = "card";
event.revenue = 16.00;
event.currency = "EUR";
serverside.execute(event);
Copy {
"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
]
}
}
add_shipping_info
This event signifies a user has submitted their shipping information.
Parameters
Name
Type
Required
Example value
Description
Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.
(*) If you supply the revenue
or value
parameter, you must also supply the currency
parameter so revenue metrics can be computed accurately.
The monetary value of the event (shipping price and taxes included ) after discount
{
id: '12345',
email: 'toto@domain.fr',
consent_categories: [1,3]
}
consent_categories
is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.
You should also add all user's properties in this user object, especially reconciliation key (id, email).
Coupon code used for a purchase.
The shipping tier (e.g. Next-day
, Air`) selected for delivery of the purchased item.
Example
JavaScript Kotlin (Android) Java (Android) Objective-C (iOS) Swift (iOS) Dart (Flutter) json
Copy 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]
}
});
Copy 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)
Copy 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);
Copy 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];
Copy 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)
Copy 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);
Copy {
"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
]
}
}
add_to_cart
This event signifies that an item was added to a cart for purchase.
Parameters (required and recommended)
Name
Type
Required
Example Value
Description
The monetary value of the event.
() value
is typically required for meaningful reporting.
( )currency
is required if you set value
.
Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.
(*) If you supply the revenue
parameter, you must also supply the currency
parameter so revenue metrics can be computed accurately.
{
id: '12345',
email: 'toto@domain.fr',
consent_categories: [1,3]
}
consent_categories
is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.
You should also add all user's properties in this user object, especially reconciliation key (id, email).
Example
JavaScript Kotlin (Android) Java (Android) Objective-C (iOS) Swift (iOS) Dart (Flutter) json
Copy 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]
}
});
Copy 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)
Copy 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);
Copy 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];
Copy 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)
Copy 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);
Copy {
"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"
]
}
}
]
}
add_to_wishlist
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)
Name
Type
Required
Example Value
Description
The monetary value of the event.
() revenue
is typically required for meaningful reporting.
( )currency
is required if you set revenue
.
Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.
(*) If you supply the revenue
parameter, you must also supply the currency
parameter so revenue metrics can be computed accurately.
{
id: '12345',
email: 'toto@domain.fr',
consent_categories: [1,3]
}
consent_categories
is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.
You should also add all user's properties in this user object, especially reconciliation key (id, email).
Example
JavaScript Kotlin (Android) Java (Android) Objective-C (iOS) Swift (iOS) Dart (Flutter) json
Copy 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]
}
});
Copy 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)
Copy 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);
Copy 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];
Copy 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)
Copy 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);
Copy {
"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"
]
}
}
]
}
begin_checkout
This event signifies that a user has begun a checkout.
Parameters (required and recommended)
Name
Type
Required
Example Value
Description
The monetary value of the event (shipping price and taxes excluded ) after discount
The monetary value of the event (shipping price and taxes included ) after discount
Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.
(*) If you supply the revenue
parameter, you must also supply the currency
parameter so revenue metrics can be computed accurately.
Coupon code used for a purchase.
Transaction id. Used as key for updates
{
id: '12345',
email: 'toto@domain.fr',
consent_categories: [1,3]
}
consent_categories
is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.
You should also add all user's properties in this user object, especially reconciliation key (id, email).
Example
JavaScript Kotlin (Android) Java (Android) Objective-C (iOS) Swift (iOS) Dart (Flutter) json
Copy 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
}
}]
})
Copy 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 = TCBeginCheckoutEvent(1.0f, 2.0f, "EUR", items)
event.coupon = "CHRISTMAS"
serverside.execute(event)
Copy 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));
TCBeginCheckoutEvent event = new TCBeginCheckoutEvent(1.0f, 2.0f, "EUR", items);
event.coupon = "CHRISTMAS";
serverside.execute(event);
Copy 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]];
TCBeginCheckoutEvent *event = [[TCBeginCheckoutEvent alloc] initWithRevenue: [[NSDecimalNumber alloc] initWithString: @"1.1"]
withValue: [[NSDecimalNumber alloc] initWithString: @"12.2"]
withCurrency: @"EUR"
withItems: items];
event.coupon = @"CHRISTMAS";
[TCS execute: event];
Copy 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 = TCBeginCheckoutEvent(revenue: 1, withValue: 3, withCurrency: "EUR", withItems: [item_1, item_2])
serverside?.execute(event)
Copy TCProduct tc_product = TCProduct();
tc_product.ID = "product_1_ID";
tc_product.name = "product_1_name";
tc_product.price = 10;
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 = 5.10;
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 = TCBeginCheckoutEvent();
event.coupon = "CHRISTMAS";
event.items = [tc_item_1, tc_item_2];
serverside.execute(event);
Copy {
"event_name": "begin_checkout",
"id": "O_12345",
"coupon": "CHRISTMAS",
"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
]
}
}
generate_lead
Log this event when a lead has been generated to understand the efficacy of your re-engagement campaigns.
Parameters (required and recommended)
Name
Type
Required
Example Value
Description
The monetary value of the event.
() revenue
is typically required for meaningful reporting.
( )currency
is required if you set revenue
.
Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.
(*) If you supply the revenue
parameter, you must also supply the currency
parameter so revenue metrics can be computed accurately.
{
id: '12345',
email: 'toto@domain.fr',
consent_categories: [1,3]
}
consent_categories
is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.
You should also add all user's properties in this user object, especially reconciliation key (id, email).
Example
JavaScript Kotlin (Android) Java (Android) Objective-C (iOS) Swift (iOS) Dart (Flutter) json
Copy cact('trigger','generate_lead', {
currency: 'EUR',
value: 9.99,
id: 'L_12345',
user: {
id: '12356',
email:'toto@domain.fr',
consent_categories: [1,3]
}
});
Copy val event = TCGenerateLeadEvent(9.99f, "EUR")
event.ID = "L_12345"
serverside.execute(event)
Copy TCGenerateLeadEvent event = new TCGenerateLeadEvent(9.99f, "EUR");
event.ID = "L_12345";
serverside.execute(event);TCLoginEvent event = new TCLoginEvent();
event.method = "LinkedIn";
serverside.execute(event);
Copy TCGenerateLeadEvent *event = [[TCGenerateLeadEvent alloc] initWithValue: [[NSDecimalNumber alloc] initWithString: @"12.2"]
withCurrency: @"EUR"];
event.ID = @"2b758628-f81b-454f-8e3d-867e8bc98523";
[TCS execute: event];
Copy let event = TCGenerateLeadEvent(value: 1, withCurrency: "EUR")
event?.ID = "2b758628-f81b-454f-8e3d-867e8bc98523";
serverside.execute(event)
Copy var event = TCGenerateLeadEvent();
event.currency = "EUR";
event.value = 9.99;
event.ID = "2b758628-f81b-454f-8e3d-867e8bc98523";
serverside.execute(event);
Copy {
"event_name": "generate_lead",
"method": "LinkedIn"
}
login
Send this event to signify that a user has logged in.
Parameters
Name
Type
Required
Example
Description
The method used to login.
{
id: '12345',
email: 'toto@domain.fr',
consent_categories: [1,3]
}
consent_categories
is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.
You should also add all user's properties in this user object, especially reconciliation key (id, email).
Example
Javascript Kotlin (Android) Java (Android) Objective-C (iOS) Swift (iOS) Dart (Flutter) json
Copy cact('trigger', 'login', {
method: 'LinkedIn',
user: {
id: '12356',
email:'toto@domain.fr',
consent_categories: [1,3]
}
});
Copy val event = TCLoginEvent()
event.method = "LinkedIn"
serverside.execute(event)
Copy TCLoginEvent event = new TCLoginEvent();
event.method = "LinkedIn";
serverside.execute(event);
Copy TCLoginEvent *event = [[TCLoginEvent alloc] init];
event.method = @"LinkedIn";
[TCS execute: event];
Copy let event = TCLoginEvent()
event.method = "linkedin"
serverside?.execute(event)
Copy var event = TCLoginEvent();
event.method = "LinkedIn";
serverside.execute(event);
Copy {
"event_name": "login",
"method": "LinkedIn"
}
page_view
The page_view
call lets you record whenever a user sees a page of your website, along with any optional properties about the page.
Parameters (required and recommended)
Name
Type
Required
Example Value
Description
Page category. Recommended predefined types:
legal (e.g. Privacy Policy)
Equivalent to tc_vars.env_template
Suggestion for Mother's Day
{
id: '12345',
email: 'toto@domain.fr',
consent_categories: [1,3]
}
consent_categories
is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.
You should also add all user's properties in this user object, especially reconciliation key (id, email).
Automatically added parameters by cact API for web sources
Name
Type
Required
Example Value
Description
{
id: '12345',
email: 'toto@domain.fr',
consent_categories: [1,3]
}
consent_categories
is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.
You should also add all user's properties in this user object, especially reconciliation key (id, email).
Example
Javascript Kotlin (Android) Java (Android) Objective-C (iOS) Swift (iOS) Dart (Flutter) json
Copy cact('trigger','page_view', {
page_type: 'product_list',
page_name: 'Best sellers',
user: {
id: '12356',
email:'toto@domain.fr',
consent_categories: [1,3]
}
});
Copy val event = TCPageViewEvent("product_list")
event.pageName = "Best sellers"
serverside.execute(event)
Copy TCPageViewEvent event = new TCPageViewEvent("product_list")
event.pageName = "Best sellers";
serverside.execute(event);
Copy TCPageViewEvent *event = [[TCPageViewEvent alloc] init];
event.pageType = @"product_list";
event.pageName = @"Best sellers";
[TCS execute: event];
//or you could also use it in a constructor, as follow:
TCPageViewEvent *event = [[TCPageViewEvent alloc] initWithType: @"type"];
Copy let event = TCPageViewEvent(type: "product list")
event?.pageName = "Best sellers"
serverside?.execute(event)
Copy var event = TCPageViewEvent();
event.pageName = "event_page_name";
event.pageType = "event_page_type";
serverside.execute(event);
Copy {
"event_name": "page_view",
"page_type": "product_list",
"page_name": "Best sellers"
}
purchase
Fire this event when one or more items are purchased by a user.
Parameters (required and recommended)
Name
Type
Required
Example
Description
Transaction id. Used as key for updates
{
id: '12345',
email: 'toto@domain.fr',
consent_categories: [1,3]
}
All properties that you add here will be used as conditions for matching users in our database.
cosent_categories
is automatically filled if you use Commanders Act CMP.
The monetary value of the event (shipping price and taxes excluded ) after discount
The monetary value of the event (shipping price and taxes included ) after discount
Shipping cost associated with a transaction.
Tax associated with a transaction.
Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.
Coupon code used for a purchase.
Type of conversion (online, offline, call etc.)
Automatically added by cact API
Name
Type
Required
Example
Description
URL to the website where you can buy the item
Equivalent to window.location.href
Example
Javascript Kotlin (Android) Java (Android) Objective-C (iOS) Swift (iOS) Dart (Flutter) json
Copy cact('trigger','purchase', {
id: 'O_12345',
coupon: 'CHRISTMAS',
revenue: 16.00,
value: 20.33,
shipping_amount: 3.33,
tax_amount: 3.20,
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
}
}]
})
Copy 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 = TCPurchaseEvent("O_12345", 16.0f, 22.53f, "EUR", "purchase", "CreditCard", "waiting", items)
event.shippingAmount = 3.33f
event.taxAmount = 3.20f
serverside.execute(event)
Copy 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));
TCPurchaseEvent event = new TCPurchaseEvent("O_12345", 16.0f, 22.53f, "EUR", "purchase", "CreditCard", "waiting", items);
event.shippingAmount = 3.33f;
event.taxAmount = 3.20f;
serverside.execute(event);
Copy 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]];
TCPurchaseEvent *event = [[TCPurchaseEvent alloc] initWithId: @"ID"
withRevenue: [[NSDecimalNumber alloc] initWithString: @"1.1"]
withValue: [[NSDecimalNumber alloc] initWithString: @"12.2"]
withCurrency: @"EUR"
withType: @"purchase"
withPaymentMethod: @"CreditCard"
withStatus: @"waiting"
withItems: items];
[TCS execute: event];
Copy 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 = TCPurchaseEvent(id: "purchaseID", withRevenue: 16.21, withValue: 23.10, withCurrency: "EUR", withType: "purchase", withPaymentMethod: "CreditCard", withStatus: "waiting", withItems: [item_1, item_2])
serverside?.execute(event)
Copy TCProduct tc_product = TCProduct();
tc_product.ID = "product_1_ID";
tc_product.name = "product_1_name";
tc_product.price = 10;
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 = 5.10;
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 = TCPurchaseEvent();
event.shippingAmount = 3.33;
event.taxAmount = 3.20;
event.revenue = 2.5;
event.value = 12.2;
event.currency = "EUR";
event.type = "purchase";
event.paymentMethod = "CreditCard";
event.status = "waiting";
event.items = [tc_item_1, tc_item_2];
serverside.execute(event);
Copy {
"event_name": "purchase",
"id": "O_12345",
"coupon": "CHRISTMAS",
"revenue": 16.00,
"value": 22.53,
"shipping_amount": 3.33,
"tax_amount": 3.20,
"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
]
}
}
refund
Fire this event when a purchase was refund
Parameters (required and recommended)
Name
Type
Required
Example
Description
Transaction id. Used as key for updates
{
id: '12345',
email: 'toto@domain.fr',
consent_categories: [1,3]
}
All properties that you add here will be used as conditions for matching users in our database.
cosent_categories
is automatically filled if you use Commanders Act CMP.
The monetary value of the event (shipping price and taxes excluded ) after discount
The monetary value of the event (shipping price and taxes included ) after discount
Shipping cost associated with a transaction.
Shipping cost associated with a transaction.
Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.
Coupon code used for a purchase.
Type of conversion (online, offline, call etc.)
(*) items
is required for partial refunds but it can be omitted for full refunds.
Automatically added by cact API
Name
Type
Required
Example
Description
URL to the website where you can buy the item
Equivalent to window.location.href
Example
JavaScript Kotlin (Android) Java (Android) Objective-C (iOS) Swift (iOS) Dart (Flutter) json
Copy cact('trigger','refund', {
id: 'O_12345',
coupon: 'CHRISTMAS',
revenue: 16.00,
value: 20.33,
shipping_amount: 3.33,
tax_amount: 3.20,
currency: 'EUR',
user: {
id: '12356',
email:'toto@domain.fr',
consent_categories: [1,3]
}
})
Copy val event = TCRefundEvent("O_12345", 16.00f, 23.53f, "EUR", "offline")
event.coupon = "CHRISTMAS"
event.shippingAmount = 4.33f
event.taxAmount = 3.20f
serverside.execute(event)
Copy TCRefundEvent event = new TCRefundEvent("O_12345", 16.00f, 23.53f, "EUR", "offline");
event.coupon = "CHRISTMAS";
event.shippingAmount = 4.33f;
event.taxAmount = 3.20f;
serverside.execute(event);
Copy 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]];
TCRefundEvent *event = [[TCRefundEvent alloc] initWithID: @"2b758628-f81b-454f-8e3d-867e8bc98523"
withRevenue: [[NSDecimalNumber alloc] initWithString: @"20.2"]
withValue: [[NSDecimalNumber alloc] initWithString: @"26.2"]
withCurrency: @"EUR"
withType: @"offline"
withItems: items];
[TCS execute: event];
Copy 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 = TCRefundEvent(id: "purchaseID", withRevenue: 16.32, withValue: 23.1, withCurrency: "EUR", withType: "refund", withItems: [item_1, item_2])
event?.shippingAmount = 11
serverside?.execute(event)
Copy var event = TCRefundEvent();
event.currency = "EUR";
event.value = 26.20;
event.revenue = 20.20;
event.coupon = "CHRISTMAS";
event.shippingAmount = 4.33;
event.taxAmount = 3.20;
event.type = "offline";
serverside.execute(event);
Copy {
"event_name": "refund",
"value": 8.00,
"currency": "EUR",
"revenue": 16.00,
"shipping_amount": 3.33,
"tax_amount": 3.20
}
remove_from_cart
This event signifies that an item was removed from a cart.
Parameters (required and recommended)
Name
Type
Required
Example Value
Description
The monetary value of the event.
() value
is typically required for meaningful reporting.
( )currency
is required if you set value
.
Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.
(*) If you supply the revenue
parameter, you must also supply the currency
parameter so revenue metrics can be computed accurately.
{
id: '12345',
email: 'toto@domain.fr',
consent_categories: [1,3]
}
consent_categories
is the user's consents list. It is automatically filled from web sources if you use Commanders Act CMP.
You should also add all user's properties in this user object, especially reconciliation key (id, email).
Example
JavaScript Kotlin (Android) Java (Android) Objective-C (iOS) Swift (iOS) Dart (Flutter) json
Copy cact('trigger','remove_from_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]
}
});
Copy 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 = TCRemoveFromCartEvent(items)
serverside.execute(event)
Copy 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));
TCRemoveFromCartEvent event = new TCRemoveFromCartEvent(items);
serverside.execute(event);
Copy 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]];
TCRemoveFromCartEvent *event = [[TCRemoveFromCartEvent alloc] initWithItems: items];
event.value = [[NSDecimalNumber alloc] initWithString: @"12.2"];
event.currency = @"EUR";
[TCS execute: event];
Copy 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 = TCRemoveFromCartEvent(items: [item_1, item_2])
event?.value = 22.53
serverside?.execute(event)
Copy TCProduct tc_product = TCProduct();
tc_product.ID = "product_1_ID";
tc_product.name = "product_1_name";
tc_product.price = 10;
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 = TCRemoveFromCartEvent();
event.value = 15.1;
event.currency = "EUR";
event.items = [tc_item_1];
serverside.execute(event);
Copy {
"event_name": "remove_from_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"
]
}
}
]
}
search
Use this event to contextualize search operations. This event can help you identify the most popular content in your app.
Parameters
Name
Type
Required
Example value
Description