E-commerce events

add_payment_info

This event signifies a user has submitted their payment information

Parameters (required and recommended)

NameTypeRequiredExample ValueDescription

payment_method

string

Yes

card

The chosen method of payment (see list of possible values below)

user

Yes

{ 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

string

No

CHRISTMAS

Coupon code used for a purchase.

revenue

number

No

16.00

Revenue (shipping price and taxes excluded) after discount. ()revenue is typically required for meaningful reporting.

()currency is required if you set revenue.

currency

string (ISO 4217)

No

EUR

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.

items

No

The items for the event.

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]
  }
});

add_shipping_info

This event signifies a user has submitted their shipping information.

Parameters

NameTypeRequiredExample valueDescription

currency

string (ISO 4217)

Yes

EUR

Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.

(*) If you supply the revenue or valueparameter, you must also supply the currency parameter so revenue metrics can be computed accurately.

value

number

Yes

22.53

The monetary value of the event (shipping price and taxes included) after discount

user

Yes

{ 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

string

No

CHRISTMAS

Coupon code used for a purchase.

shipping_tier

string

No

Ground

The shipping tier (e.g. Next-day, Air`) selected for delivery of the purchased item.

items

Yes

The items for the event.

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]
  }
});

add_to_cart

This event signifies that an item was added to a cart for purchase.

Parameters (required and recommended)

NameTypeRequiredExample ValueDescription

value

number

Yes*

8.00

The monetary value of the event. ()value is typically required for meaningful reporting.

()currency is required if you set value.

currency

string (ISO 4217)

Yes*

EUR

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.

user

Yes

{ 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).

items

Yes

The items for the event.

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]
  }
});

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)

NameTypeRequiredExample ValueDescription

value

number

No

8.00

The monetary value of the event. ()revenue is typically required for meaningful reporting.

()currency is required if you set revenue.

currency

string (ISO 4217)

No

EUR

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.

user

Yes

{ 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).

items

Yes

The items for the event.

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]
  }
});

begin_checkout

This event signifies that a user has begun a checkout.

Parameters (required and recommended)

NameTypeRequiredExample ValueDescription

revenue

number

Yes

16.00

The monetary value of the event (shipping price and taxes excluded) after discount

value

number

Yes

22.53

The monetary value of the event (shipping price and taxes included) after discount

currency

string (ISO 4217)

Yes

EUR

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

string

No

CHRISTMAS

Coupon code used for a purchase.

id

string

No

0_12345

Transaction id. Used as key for updates

user

Yes

{ 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).

items

Yes

The items of the event.

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
    }
  }]
})