Analytic Events and Context
Overview
These events are used to track user behavior and to send data to the analytics provider.
Events
product_added_to_cart
The product_added_to_cart event is triggered when a product is added to the cart.
| Field Name | Data Type | Description |
|---|---|---|
| currency | string | The currency in which the item is priced. |
| item_brand | string | The brand of the item. |
| item_id | string | A unique identifier for the item. |
| item_name | string | The name of the item. |
| item_variant | string | The variant of the item, if applicable. |
| price | float | The price of the item. |
| quantity | integer | The number of items being purchased. |
| value | float | The total value of the items being purchased (price * quantity). |
| variant_currency | string | The currency in which the variant is priced. |
| variant_id | string | A unique identifier for the variant. |
| variant_price | float | The price of the variant. |
Example:
{
"currency": "INR",
"item_brand": "brand name",
"item_id": "1234567890",
"item_name": "product name",
"item_variant": "variant name",
"price": 100,
"quantity": 1,
"value": 100,
"variant_currency": "INR",
"variant_id": "1234567890",
"variant_price": 100
}
Context
| Field Name | Data Type | Description |
|---|---|---|
| pageId | string | The identifier of the page. (Example: productDetail) |
| product | Product | A Shopify object representing a product. |
| variant | ProductVariant | A Shopify object representing a variant of a product. |
remove_from_cart
The remove_from_cart event is triggered when a product is removed from the cart.
| Field Name | Data Type | Description |
|---|---|---|
| currency | string | The currency in which the item is priced. |
| item_brand | string | The brand of the item. |
| item_id | string | A unique identifier for the item. |
| item_name | string | The name of the item. |
| item_variant | string | The variant of the item, if applicable. |
| price | float | The price of the item. |
| quantity | integer | The number of items being purchased. |
| value | float | The total value of the items being purchased (price * quantity). |
| variant_currency | string | The currency in which the variant is priced. |
| variant_id | string | A unique identifier for the variant. |
| variant_price | float | The price of the variant. |
Context
| Field Name | Data Type | Description |
|---|---|---|
| pageId | string | The identifier of the page. (Example: productDetail) |
| product | Product | A Shopify object representing a product. |
| variant | ProductVariant | A Shopify object representing a variant of a product. |
product_viewed
The product_viewed event is triggered when a product is viewed.
| Field Name | Data Type | Description |
|---|---|---|
| currency | string | The currency in which the item is priced. |
| item_brand | string | The brand of the item. |
| item_id | string | A unique identifier for the item. |
| item_name | string | The name of the item. |
| item_variant | string | The variant of the item, if applicable. |
| price | float | The price of the item. |
| quantity | integer | The number of items being purchased. |
| value | float | The total value of the items being purchased (price * quantity). |
| variant_currency | string | The currency in which the variant is priced. |
| variant_id | string | A unique identifier for the variant. |
| variant_price | float | The price of the variant. |
Context
| Field Name | Data Type | Description |
|---|---|---|
| pageId | string | The identifier of the page. (Example: productDetail) |
| product | Product | A Shopify object representing a product. |
| variant | ProductVariant | A Shopify object representing a variant of a product. |
user_login
The user_login event is triggered when a user logs in.
| Field Name | Data Type | Description |
|---|---|---|
| string | The email address of the user. | |
| id | string | The unique identifier of the user. |
| method | string | The method used to log in. |
| name | string | The name of the user. |
| phone | string | The phone number of the user. |
Example:
{
"email": "[email protected]",
"id": "1234567890",
"method": "email",
"name": "test",
"phone": "1234567890"
}
Context
| Field Name | Data Type | Description |
|---|---|---|
| customer | Customer | A Shopify object representing a customer. |
user_logout
The user_logout event is triggered when a user logs out.
| Field Name | Data Type | Description |
|---|---|---|
| string | The email address of the user. | |
| id | string | The unique identifier of the user. |
| name | string | The name of the user. |
| phone | string | The phone number of the user. |
Context
| Field Name | Data Type | Description |
|---|---|---|
| customer | Customer | A Shopify object representing a customer. |
user_register
The user_register event is triggered when a user registers.
| Field Name | Data Type | Description |
|---|---|---|
| string | The email address of the user. | |
| id | string | The unique identifier of the user. |
| name | string | The name of the user. |
| phone | string | The phone number of the user. |
Context
| Field Name | Data Type | Description |
|---|---|---|
| customer | Customer | A Shopify object representing a customer. |
checkout_started
The checkout_started event is triggered when a checkout is started.
| Field Name | Data Type | Description |
|---|---|---|
| currency | string | The currency in which the item is priced. |
| id | string | The unique identifier of the checkout. |
| products_count | integer | The number of products in the checkout. |
| total_amount | float | The total amount of the checkout. |
Context
| Field Name | Data Type | Description |
|---|---|---|
| cart | Checkout | A Shopify object representing a checkout. |
checkout_completed
The checkout_completed event is triggered when a checkout is completed.
| Field Name | Data Type | Description |
|---|---|---|
| currency | string | The currency in which the item is priced. |
| id | string | The unique identifier of the checkout. |
| order_id | string | The unique identifier of the order. |
| order_number | integer | The number of the order. |
| products_count | integer | The number of products in the checkout. |
| total_amount | float | The total amount of the checkout. |
Context
| Field Name | Data Type | Description |
|---|---|---|
| cart | Checkout | A Shopify object representing a checkout. |
view_item_list
The view_item_list event is triggered when a user views a list of items.
| Field Name | Data Type | Description |
|---|---|---|
| items | array | An array of items in the list. |
Context
No context passed
product_search
The product_search event is triggered when a user searches for a product.
| Field Name | Data Type | Description |
|---|---|---|
| query | string | The search query. |
Example:
{
"query": "T shirt"
}
Context
No context passed
cart.applycoupon
The cart.applycoupon event is triggered when a user applies a coupon to the cart.
| Field Name | Data Type | Description |
|---|---|---|
| category | string | The category of the event. |
| action | string | The action of the event. |
| couponCode | string | The coupon code. |
Example:
"category": "",
"action": "APPLY_COUPON",
"couponCode": "couponCodeName"
Context
No context passed
product_added_to_wishlist
The product_added_to_wishlist event is triggered when a product is added to the wishlist.
| Field Name | Data Type | Description |
|---|---|---|
| currency | string | The currency in which the item is priced. |
| item_brand | string | The brand of the item. |
| item_id | string | A unique identifier for the item. |
| item_name | string | The name of the item. |
| item_variant | string | The variant of the item, if applicable. |
| price | float | The price of the item. |
| quantity | integer | The number of items being purchased. |
| value | float | The total value of the items being purchased (price * quantity). |
| variant_currency | string | The currency in which the variant is priced. |
| variant_id | string | A unique identifier for the variant. |
| variant_price | float | The price of the variant. |
Example:
{
"item_name": "Polo para Hombre FOX CLASSIC CALIBRATED TECH TEE RDCY",
"currency": "INR",
"item_id": "6944079839364",
"price": 87.92,
"item_brand": "fox",
"quantity": 1,
"item_variant": "RDCY / S",
"variant_price": 87.92,
"value": 87.92,
"variant_currency": "INR",
"variant_id": "40866875801732"
}
Context
| Field Name | Data Type | Description |
|---|---|---|
| product | Product | A Shopify object representing a product. |
product_removed_from_wishlist
The product_removed_from_wishlist event is triggered when a product is removed from the wishlist.
| Field Name | Data Type | Description |
|---|---|---|
| currency | string | The currency in which the item is priced. |
| item_brand | string | The brand of the item. |
| item_id | string | A unique identifier for the item. |
| item_name | string | The name of the item. |
| item_variant | string | The variant of the item, if applicable. |
| price | float | The price of the item. |
| quantity | integer | The number of items being purchased. |
| value | float | The total value of the items being purchased (price * quantity). |
| variant_currency | string | The currency in which the variant is priced. |
| variant_id | string | A unique identifier for the variant. |
| variant_price | float | The price of the variant. |
Context
| Field Name | Data Type | Description |
|---|---|---|
| product | Product | A Shopify object representing a product. |
shareProduct
The shareProduct event is triggered when a user shares a product.
| Field Name | Data Type | Description |
|---|---|---|
| product_name | string | The name of the product. |
Context
No context passed
view_cart
The view_cart event is triggered when a user views the cart.
| Field Name | Data Type | Description |
|---|---|---|
| currency | string | The currency in which the item is priced. |
| id | string | A unique identifier for the item. |
| total_price | float | The total price of the items in the cart. |
| total_quantity | integer | The total quantity of the items in the cart. |
Example:
{
"id": "gid://shopify/Checkout/883e81276c5bb5307814a58cea91eeef?key=aecd46933486b47241453786ccdef3e9",
"currency": "INR",
"total_price": 285.0,
"total_quantity": 2
}
Context
| Field Name | Data Type | Description |
|---|---|---|
| cart | Cart | A Shopify object representing a cart. |
sortApply
The sortApply event is triggered when a user applies a sort to the list of products.
| Field Name | Data Type | Description |
|---|---|---|
| value | string | The sort applied to the list of products. |
Context
No context passed
ApplyFilter
The ApplyFilter event is triggered when a user applies a filter to the list of products.
| Field Name | Data Type | Description |
|---|---|---|
| action | string | The action of the event. |
| filterItem | array | The filter applied to the list of products. |
Example:
{
"action": "ApplyFilter",
"filterItem": [ { "available": true } ]
}
Context
No context passed
drawerCategoryClick
The drawerCategoryClick event is triggered when a user clicks on a category in the drawer.
| Field Name | Data Type | Description |
|---|---|---|
| title | string | The title of the event. |
| action | string | The action of the event. |
Example:
{
"title": "Collection 1-1",
"action": "OPEN_COLLECTION"
}
Context
No context passed