The E-commerce Events function is very similarly to the custom events feature. It relies on the global va function available in the website of the user that sends the events through the worker to the API.
The events follow a very similar structure to Google Analytics in order to facilitate migration.
This event is triggered when a user submits their payment information during an ecommerce checkout process. This information typically includes the user’s credit card number, billing address, and other relevant details. By tracking this event, you will gain insights into the number of successful transactions and the effectiveness of your payment processing system.
va('ecom', 'add_payment_info', {
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"currency": "RON",
"value": 0.00,
"method": "Credit Card"
})
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
currency | string | Yes* | EUR | Currency of the items associated with the event, in 3-letter ISO 4217 format. |
value | number | Yes* | 17.99 | The monetary value of the event. |
coupon | string | No | Coupon_code | The coupon name/code associated with the event. |
payment_type | string | No | Credit Card | The chosen method of payment |
items | Array<Item> | Yes | | The items of the event. |
This event is triggered when a user submits their shipping information during an ecommerce checkout process. Shipping information typically includes the user’s name, address, and other relevant details that are required to deliver the purchased product to them. By tracking this event, you will gain insights into the number of successful deliveries and the effectiveness of your shipping process. This can help you to optimize your shipping strategies and improve overall customer satisfaction.
va('ecom','add_shipping_info',{
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"currency":"RON",
"value":0.00,
"shippingTier":"DHL"
})
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
currency | string | Yes* | EUR | Currency of the items associated with the event, in 3-letter ISO 4217 format. |
value | number | Yes* | 17.99 | The monetary value of the event (quantity * price) |
coupon | string | No | Coupon_code | The coupon name/code associated with the event. |
shipping_tier | string | No | Ground | The shipping tier (e.g. Ground, Air, Next-day) selected for delivery of the purchased item. |
items | Array<Item> | Yes | | The items of the event. |
This event is triggered when a user adds an item to their cart during an ecommerce session. By tracking this event, you will gain insights into the number of items added to the cart and the effectiveness of your product placement and pricing strategies. This can help you optimize your ecommerce experience and improve customer satisfaction.
va('ecom','add_to_cart',{
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"currency":"RON",
"value":0.00,
"items":[
{
"id": "SKU_123",
"item_name": "iPhone 15",
"affiliation": "Magazin online #1",
"coupon": "50%OFF",
"discount": 10,
"index": 0,
"item_brand": "Apple",
"item_category": "Category 1",
"item_category2": "Category 2",
"item_category3": "Category 3",
"item_category4": "Category 4",
"item_category5": "Category 5",
"item_list_id": "LIST-123",
"item_list_name": "John's wishlist",
"item_variant": "Sky Blue",
"location_id": "Online shop #2",
"price": 6512.30,
"quantity": 1,
"image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
}
]
})
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
currency | string | Yes* | EUR | Currency of the items associated with the event, in 3-letter ISO 4217 format. |
value | number | Yes* | 17.99 | The monetary value of the event. |
items | Array<Item> | Yes | | The items of the event. |
This event indicates that a user has added an item to their wishlist. You can leverage this event to identify popular gift items in your app.
va('ecom','add_to_wishlist',{
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"currency":"RON",
"value":0.00,
"items":[
{
"id": "SKU_123",
"item_name": "iPhone 15",
"affiliation": "Magazin online #1",
"coupon": "50%OFF",
"discount": 10,
"index": 0,
"item_brand": "Apple",
"item_category": "Category 1",
"item_category2": "Category 2",
"item_category3": "Category 3",
"item_category4": "Category 4",
"item_category5": "Category 5",
"item_list_id": "LIST-123",
"item_list_name": "John's wishlist",
"item_variant": "Sky Blue",
"location_id": "Online shop #2",
"price": 6512.30,
"quantity": 1,
"image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
}
]
})
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
currency | string | Yes* | EUR | Currency of the items associated with the event, in 3-letter ISO 4217 format. |
value | number | Yes* | 17.99 | The monetary value of the event. |
items | Array<Item> | Yes | | The items of the event. |
This event indicates that a user has initiated the checkout process.
va('ecom','begin_checkout',{
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"currency":"RON",
"value":0.00,
"coupon": "DISCOUNT CODE",
"items":[
{
"id": "SKU_123",
"item_name": "iPhone 15",
"affiliation": "Magazin online #1",
"coupon": "50%OFF",
"discount": 10,
"index": 0,
"item_brand": "Apple",
"item_category": "Category 1",
"item_category2": "Category 2",
"item_category3": "Category 3",
"item_category4": "Category 4",
"item_category5": "Category 5",
"item_list_id": "LIST-123",
"item_list_name": "John's wishlist",
"item_variant": "Sky Blue",
"location_id": "Online shop #2",
"price": 6512.30,
"quantity": 1,
"image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
}
]
})
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
currency | string | Yes* | EUR | Currency of the items associated with the event, in 3-letter ISO 4217 format. |
value | number | Yes* | 17.99 | The monetary value of the event. |
coupon | string | No | Coupon_code | The coupon name/code associated with the event. |
items | Array<Item> | Yes | | The items of the event. |
This event is used to track when a lead is generated, such as through a form completion. By logging this event, you will gain insights into the effectiveness of your marketing campaigns and how many customers re-engage with your business after remarketing to them. This can help you optimize your marketing strategies and improve your customer engagement.
va('ecom','generate_lead',{
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"currency":"RON",
"value":0.00
})
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
currency | string | Yes* | EUR | Currency of the items associated with the event, in 3-letter ISO 4217 format. |
value | number | Yes* | 17.99 | The monetary value of the event. |
Use this event to indicate that a user has logged in to your website or app.
va('ecom','login',{
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"method": "Basic auth"
})
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
method | string | No | TWIPLA | The method used to login. |
This event indicates that a user has bought one or more items.
va('ecom','purchase',{
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"transaction_id": "PayPal12312321312",
"currency": "RON",
"value": 6502.30,
"coupon": "DISCOUNT_CODE",
"shipping":12.50,
"tax": 850.21,
"items":[
{
"id": "SKU_123",
"item_name": "iPhone 15",
"affiliation": "Magazin online #1",
"coupon": "50%OFF",
"discount": 10,
"index": 0,
"item_brand": "Apple",
"item_category": "Category 1",
"item_category2": "Category 2",
"item_category3": "Category 3",
"item_category4": "Category 4",
"item_category5": "Category 5",
"item_list_id": "LIST-123",
"item_list_name": "John's wishlist",
"item_variant": "Sky Blue",
"location_id": "Online shop #2",
"price": 6512.30,
"quantity": 1,
"image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
}
]
})
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
currency | string | Yes* | EUR | Currency of the items associated with the event, in 3-letter ISO 4217 format. |
value | number | Yes* | 17.99 | The monetary value of the event. |
transaction_id | string | Yes | T_12345 | The unique identifier of a transaction. |
coupon | string | No | Coupon_code | The coupon name/code associated with the event. |
shipping | number | No | 3.33 | Shipping cost associated with a transaction. |
tax | number | No | 1.11 | Tax cost associated with a transaction. |
items | Array<Item> | Yes | | The items of the event. |
This event indicates that one or more items have been refunded to a user.
va('ecom','refund',{
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"transaction_id": "PayPal12312321312",
"currency": "RON",
"value": 6502.30,
"coupon": "DISCOUNT_CODE",
"shipping":12.50,
"tax": 850.21,
"items":[
{
"id": "SKU_123",
"item_name": "iPhone 15",
"affiliation": "Magazin online #1",
"coupon": "50%OFF",
"discount": 10,
"index": 0,
"item_brand": "Apple",
"item_category": "Category 1",
"item_category2": "Category 2",
"item_category3": "Category 3",
"item_category4": "Category 4",
"item_category5": "Category 5",
"item_list_id": "LIST-123",
"item_list_name": "John's wishlist",
"item_variant": "Sky Blue",
"location_id": "Online shop #2",
"price": 6512.30,
"quantity": 1,
"image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
}
]
})
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
currency | string | Yes* | EUR | Currency of the items associated with the event, in 3-letter ISO 4217 format. |
transaction_id | string | Yes | T_12345 | The unique identifier of a transaction. |
value | number | Yes* | 17.99 | The monetary value of the event. |
coupon | string | No | Coupon_code | The coupon name/code associated with the event. |
shipping | number | No | 3.33 | Shipping cost associated with a transaction. |
tax | number | No | 1.11 | Tax cost associated with a transaction. |
items | Array<Item> | No* | | The items of the event. |
This event indicates that a user has taken an item out of their cart. The occurrence of this event is a clear indication that an item has been removed from a cart.
va('ecom','remove_from_cart',{
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"currency":"RON",
"value":0.00,
"items":[
{
"id": "SKU_123",
"item_name": "iPhone 15",
"affiliation": "Magazin online #1",
"coupon": "50%OFF",
"discount": 10,
"index": 0,
"item_brand": "Apple",
"item_category": "Category 1",
"item_category2": "Category 2",
"item_category3": "Category 3",
"item_category4": "Category 4",
"item_category5": "Category 5",
"item_list_id": "LIST-123",
"item_list_name": "John's wishlist",
"item_variant": "Sky Blue",
"location_id": "Online shop #2",
"price": 6512.30,
"quantity": 1,
"image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
}
]
})
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
currency | string | Yes* | EUR | Currency of the items associated with the event, in 3-letter ISO 4217 format. |
value | number | Yes* | 17.99 | The monetary value of the event. |
items | Array<Item> | Yes | | The items of the event. |
The event signifies that an item was removed from a wishlist.
va('ecom','remove_from_wishlist',{
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"currency":"RON",
"value":0.00,
"items":[
{
"id": "SKU_123",
"item_name": "iPhone 15",
"affiliation": "Magazin online #1",
"coupon": "50%OFF",
"discount": 10,
"index": 0,
"item_brand": "Apple",
"item_category": "Category 1",
"item_category2": "Category 2",
"item_category3": "Category 3",
"item_category4": "Category 4",
"item_category5": "Category 5",
"item_list_id": "LIST-123",
"item_list_name": "John's wishlist",
"item_variant": "Sky Blue",
"location_id": "Online shop #2",
"price": 6512.30,
"quantity": 1,
"image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
}
]
})
This event should be used to identify when a user has shared content.
va('ecom','share',{
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"method": "Twitter",
"items":[
{
"id": "SKU_123",
"item_name": "iPhone 15",
"affiliation": "Magazin online #1",
"coupon": "50%OFF",
"discount": 10,
"index": 0,
"item_brand": "Apple",
"item_category": "Category 1",
"item_category2": "Category 2",
"item_category3": "Category 3",
"item_category4": "Category 4",
"item_category5": "Category 5",
"item_list_id": "LIST-123",
"item_list_name": "John's wishlist",
"item_variant": "Sky Blue",
"location_id": "Online shop #2",
"price": 6512.30,
"quantity": 1,
"image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
}
]
})
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
method | string | No | | The method in which the content is shared. |
content_type | string | No | image | The type of shared content. |
item_id | string | No | C_12345 | The ID of the shared content. |
The occurrence of this event is a clear indication that a user has created an account. You can leverage this event to identify and analyze the distinct behaviors of users who are logged in and those who are not.
va('ecom','sign_up',{
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"method": "Google"
})
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
method | string | No | TWIPLA | The method used for sign up. |
The occurrence of this event is a clear indication that a user has looked at the contents of their cart.
va('ecom','view_cart',{
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"currency":"RON",
"value":0.00,
"items":[
{
"id": "SKU_123",
"item_name": "iPhone 15",
"affiliation": "Magazin online #1",
"coupon": "50%OFF",
"discount": 10,
"index": 0,
"item_brand": "Apple",
"item_category": "Category 1",
"item_category2": "Category 2",
"item_category3": "Category 3",
"item_category4": "Category 4",
"item_category5": "Category 5",
"item_list_id": "LIST-123",
"item_list_name": "John's wishlist",
"item_variant": "Sky Blue",
"location_id": "Online shop #2",
"price": 6512.30,
"quantity": 1,
"image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
}
]
})
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
currency | string | Yes* | EUR | Currency of the items associated with the event, in 3-letter ISO 4217 format. |
value | number | Yes* | 17.99 | The monetary value of the event. |
items | Array<Item> | Yes | | The items of the event. |
This event indicates that a user has viewed some content. You can use this event to identify the most frequently viewed items.
va('ecom','view_item',{
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"currency":"RON",
"value":0.00,
"items":[
{
"id": "SKU_123",
"item_name": "iPhone 15",
"affiliation": "Magazin online #1",
"coupon": "50%OFF",
"discount": 10,
"index": 0,
"item_brand": "Apple",
"item_category": "Category 1",
"item_category2": "Category 2",
"item_category3": "Category 3",
"item_category4": "Category 4",
"item_category5": "Category 5",
"item_list_id": "LIST-123",
"item_list_name": "John's wishlist",
"item_variant": "Sky Blue",
"location_id": "Online shop #2",
"price": 6512.30,
"quantity": 1,
"image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
}
]
})
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
currency | string | Yes* | EUR | Currency of the items associated with the event, in 3-letter ISO 4217 format. |
value | number | Yes* | 17.99 | The monetary value of the event. |
items | Array<Item> | Yes | | The items of the event. |
Record this event when the user has been shown a list of items belonging to a specific category.
va('ecom','view_item_list',{
"customer": {
"id": "internalID",
"name": "John Smith",
"email": "john@smith.com",
"phoneNumber": "+4012312312312"
},
"term": "Item List Name",
"currency":"RON",
"value":0.00,
"items":[
{
"id": "SKU_123",
"item_name": "iPhone 15",
"affiliation": "Magazin online #1",
"coupon": "50%OFF",
"discount": 10,
"index": 0,
"item_brand": "Apple",
"item_category": "Category 1",
"item_category2": "Category 2",
"item_category3": "Category 3",
"item_category4": "Category 4",
"item_category5": "Category 5",
"item_list_id": "LIST-123",
"item_list_name": "John's wishlist",
"item_variant": "Sky Blue",
"location_id": "Online shop #2",
"price": 6512.30,
"quantity": 1,
"image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
}
]
})
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
item_list_id | string | No | related_products | The ID of the list in which the item was presented to the user. |
item_list_name | string | No | Related products | The name of the list in which the item was presented to the user. |
items | Array<Item> | Yes | | The items of the event. |