Ecommerce Real-time Events
To use all Opti-X placement methods, the following events are considered mandatory:
Online Order, Product View, Add to cart, Remove from Cart , Empty Cart.
Online Order (Mandatory)
Online orders refer to confirming orders after adding items to the cart. Other Orders can be offline purchases or orders that do not fit the standard approach of online orders. One event of online order refers to one item ordered with a variable quantity.
Event Key | Event Name | Type |
---|---|---|
online_order | Online Order | Simple Event |
Event’s Parameters:
Optional fields are marked with *
Parameter Key | Type | Example | Description |
---|---|---|---|
session_id* | String | 248rhdbuw2her1 | Users browser session. |
userid | String | ExampleUser1234 | Unique key identifying the user. |
eventdatetime | Timestamp | 2024-03-09 06:00:12.000 | Date Time of the order. |
product_id | String | RippedJeans1934256 | Product Key |
variant_id* | String | RippedJeans1934256-Blue | Key identifying the variant of the product |
sku_id* | String | RippedJeans1934256-Blue-W28H30 | Key identifying the sku of the variant. |
brand | String | Example Brand | Brand of the item. |
category | String | C-22149 | Key Identifying the lowest level of category. |
department | String | D-902es | Key Identifying the department or highest level of category. |
url* | String | https://www.example.com/jeans/1934256 | Link to the product |
page_title* | String | Casual Ripped Blue Jeans | Title of the product’s page |
page_category* | String | Clothing – Jeans | Category of the product’s page. |
currency* | String | USD | Currency of the order |
Item_name* | String | Casual Ripped Blue Jeans | Item Name |
quantity* | Number | 2 | Quantity |
total_pay* | Number | 40 | Total Pay of the item order with consideration to quantity (e.g. the original price total is 44.44 for 2 jeans, 10% discount was applied overall). |
discount_percentage* | Number | 10 | Discount applied as a percentage |
Item_order_id* | String | OI-1298840 | Item Order ID |
order_id | String | O-3sd82rhf | Order ID |
tax_amount* | Number | 2 | Tax amount of the product with consideration to quantity. |
delivery_fee* | Number | 4.99 | Delivery Fee (may come with other products). |
Product View (Mandatory)
Product views refer to product browsed on the ecommerce site. Fields related to variant and skus may be optional to accommodate for clients having separate pages for product variants and skus. If the site has a page to the product, and the user views a variant and sku under the same link, these must be provided as separate product view events with variant/sku fields populated.
Event Key | Event Name | Type |
---|---|---|
product_view | Product View | Simple Event |
Event’s Parameters:
Optional fields are marked with *
Event Key | Type | Example | Description |
---|---|---|---|
session_id* | String | 248rhdbuw2her1 | Users browser session. |
userid | String | ExampleUser1234 | Unique key identifying the user. |
eventdatetime | Timestamp | 2024-03-09 07:00:14.000 | Date Time of the order. |
product_id | String | SkMensSlipIn238745 | Product Key |
variant_id* | String | SkMensSlipIn238745-912 | Key identifying the variant of the product |
sku_id* | String | SkMensSlipIn238745-912-S6 | Key identifying the sku of the variant. |
brand | String | ExampleBrand | Brand of the item. |
category | String | C-9iu032 | Key Identifying the lowest level of category. |
department | String | D-290ijos | Key Identifying the department or highest level of category. |
url* | String | https://www.example.com/products/SkMensSlipIn238745 | Link to the product |
page_title* | String | Men's Slip In - Brand New | Title of the product’s page |
page_category* | String | Products - Shoes | Category of the product’s page. |
currency* | String | GBP | Currency of the order |
Item_name* | String | Men's Slip In | Item Name |
price* | Number | 35.99 | Price at the time of product view. This should only consider what is shown on the site (some ecommerce sites show tax at checkout). |
Add To Cart (Mandatory) & Remove From Cart (Mandatory)
Events related to adding and removing items from the cart. Add to cart, remove from cart and empty cart events are necessary for cart and product abandonment use cases.
Event Key | Event Name | Type |
---|---|---|
add_to_cart | Add To Cart | Simple Event |
remove_from_cart | Remove From Cart | Simple Event |
Event’s Parameters:
Optional fields are marked with *
Parameter Key | Type | Example | Description |
---|---|---|---|
session_id* | String | 248rhdbuw2her1 | Users browser session. |
userid | String | ExampleUser1234 | Unique key identifying the user. |
eventdatetime | Timestamp | 2024-03-09 07:00:14.000 | Date Time of the event. |
product_id | String | 10Pencils1843 | Product Viewed |
variant_id* | String | 10Pencils1843Coloured1234 | Variant of the product viewed |
sku_id* | String | 10Pencils1843Coloured1234-23iuhw | Sku of the variant. |
brand | String | Example Brand | Brand of the product. |
category | String | C-P3nc1l | Key Identifying the lowest level of category. |
department | String | D-St4t10n4ry | Key Identifying the department or highest level of category. |
url* | String | https://www.example.com/product/10Pencils1843 | Url of product or product-variant or sku. |
page_title* | String | Coloured Pencils | Title of the page |
page_category* | String | Pencils | Category of the page |
currency | String | GBP | Currency |
Item_name* | String | Coloured Pencils 10 pack. | Product/Variant/SkuName. Provide the lowest level. |
quantity* | Number | Quantity | Quantity |
total_price* | Number | 30 | Total Price. Consider quantity * price of the item, discount, * tax included. |
tax_amount* | Number | 2 | Tax amount of the product with consideration to quantity. |
delivery_fee* | Number | 4.99 | Delivery Fee |
Empty Cart (Mandatory)
Event where all items are removed from a cart. Add to cart, remove from cart and empty cart events are necessary for cart and product abandonment use cases. It is not necessary to also send ‘Remove from Cart’ events for each item for an empty cart event.
Event Key | Event Name | Type |
---|---|---|
empty_cart | empty_cart | Simple Event |
Event’s Parameters:
Optional fields are marked with *
Parameter Key | Type | Example | Description |
---|---|---|---|
session_id* | String | 248rhdbuw2her1 | Users browser session. |
userid | String | ExampleUser1234 | Unique key identifying the user. |
eventdatetime | Timestamp | 2024-03-09 07:00:14.000 | Date Time of the order. |
Updated about 2 months ago