Skip to main content

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 NameData TypeDescription
currencystringThe currency in which the item is priced.
item_brandstringThe brand of the item.
item_idstringA unique identifier for the item.
item_namestringThe name of the item.
item_variantstringThe variant of the item, if applicable.
pricefloatThe price of the item.
quantityintegerThe number of items being purchased.
valuefloatThe total value of the items being purchased (price * quantity).
variant_currencystringThe currency in which the variant is priced.
variant_idstringA unique identifier for the variant.
variant_pricefloatThe 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 NameData TypeDescription
pageIdstringThe identifier of the page. (Example: productDetail)
productProductA Shopify object representing a product.
variantProductVariantA 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 NameData TypeDescription
currencystringThe currency in which the item is priced.
item_brandstringThe brand of the item.
item_idstringA unique identifier for the item.
item_namestringThe name of the item.
item_variantstringThe variant of the item, if applicable.
pricefloatThe price of the item.
quantityintegerThe number of items being purchased.
valuefloatThe total value of the items being purchased (price * quantity).
variant_currencystringThe currency in which the variant is priced.
variant_idstringA unique identifier for the variant.
variant_pricefloatThe price of the variant.

Context

Field NameData TypeDescription
pageIdstringThe identifier of the page. (Example: productDetail)
productProductA Shopify object representing a product.
variantProductVariantA Shopify object representing a variant of a product.

product_viewed

The product_viewed event is triggered when a product is viewed.

Field NameData TypeDescription
currencystringThe currency in which the item is priced.
item_brandstringThe brand of the item.
item_idstringA unique identifier for the item.
item_namestringThe name of the item.
item_variantstringThe variant of the item, if applicable.
pricefloatThe price of the item.
quantityintegerThe number of items being purchased.
valuefloatThe total value of the items being purchased (price * quantity).
variant_currencystringThe currency in which the variant is priced.
variant_idstringA unique identifier for the variant.
variant_pricefloatThe price of the variant.

Context

Field NameData TypeDescription
pageIdstringThe identifier of the page. (Example: productDetail)
productProductA Shopify object representing a product.
variantProductVariantA Shopify object representing a variant of a product.

user_login

The user_login event is triggered when a user logs in.

Field NameData TypeDescription
emailstringThe email address of the user.
idstringThe unique identifier of the user.
methodstringThe method used to log in.
namestringThe name of the user.
phonestringThe phone number of the user.

Example:

{
"email": "[email protected]",
"id": "1234567890",
"method": "email",
"name": "test",
"phone": "1234567890"
}

Context

Field NameData TypeDescription
customerCustomerA Shopify object representing a customer.

user_logout

The user_logout event is triggered when a user logs out.

Field NameData TypeDescription
emailstringThe email address of the user.
idstringThe unique identifier of the user.
namestringThe name of the user.
phonestringThe phone number of the user.

Context

Field NameData TypeDescription
customerCustomerA Shopify object representing a customer.

user_register

The user_register event is triggered when a user registers.

Field NameData TypeDescription
emailstringThe email address of the user.
idstringThe unique identifier of the user.
namestringThe name of the user.
phonestringThe phone number of the user.

Context

Field NameData TypeDescription
customerCustomerA Shopify object representing a customer.

checkout_started

The checkout_started event is triggered when a checkout is started.

Field NameData TypeDescription
currencystringThe currency in which the item is priced.
idstringThe unique identifier of the checkout.
products_countintegerThe number of products in the checkout.
total_amountfloatThe total amount of the checkout.

Context

Field NameData TypeDescription
cartCheckoutA Shopify object representing a checkout.

checkout_completed

The checkout_completed event is triggered when a checkout is completed.

Field NameData TypeDescription
currencystringThe currency in which the item is priced.
idstringThe unique identifier of the checkout.
order_idstringThe unique identifier of the order.
order_numberintegerThe number of the order.
products_countintegerThe number of products in the checkout.
total_amountfloatThe total amount of the checkout.

Context

Field NameData TypeDescription
cartCheckoutA Shopify object representing a checkout.

view_item_list

The view_item_list event is triggered when a user views a list of items.

Field NameData TypeDescription
itemsarrayAn array of items in the list.

Context

No context passed

The product_search event is triggered when a user searches for a product.

Field NameData TypeDescription
querystringThe 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 NameData TypeDescription
categorystringThe category of the event.
actionstringThe action of the event.
couponCodestringThe 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 NameData TypeDescription
currencystringThe currency in which the item is priced.
item_brandstringThe brand of the item.
item_idstringA unique identifier for the item.
item_namestringThe name of the item.
item_variantstringThe variant of the item, if applicable.
pricefloatThe price of the item.
quantityintegerThe number of items being purchased.
valuefloatThe total value of the items being purchased (price * quantity).
variant_currencystringThe currency in which the variant is priced.
variant_idstringA unique identifier for the variant.
variant_pricefloatThe 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 NameData TypeDescription
productProductA 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 NameData TypeDescription
currencystringThe currency in which the item is priced.
item_brandstringThe brand of the item.
item_idstringA unique identifier for the item.
item_namestringThe name of the item.
item_variantstringThe variant of the item, if applicable.
pricefloatThe price of the item.
quantityintegerThe number of items being purchased.
valuefloatThe total value of the items being purchased (price * quantity).
variant_currencystringThe currency in which the variant is priced.
variant_idstringA unique identifier for the variant.
variant_pricefloatThe price of the variant.

Context

Field NameData TypeDescription
productProductA Shopify object representing a product.

shareProduct

The shareProduct event is triggered when a user shares a product.

Field NameData TypeDescription
product_namestringThe name of the product.

Context

No context passed

view_cart

The view_cart event is triggered when a user views the cart.

Field NameData TypeDescription
currencystringThe currency in which the item is priced.
idstringA unique identifier for the item.
total_pricefloatThe total price of the items in the cart.
total_quantityintegerThe 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 NameData TypeDescription
cartCartA Shopify object representing a cart.

sortApply

The sortApply event is triggered when a user applies a sort to the list of products.

Field NameData TypeDescription
valuestringThe 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 NameData TypeDescription
actionstringThe action of the event.
filterItemarrayThe 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 NameData TypeDescription
titlestringThe title of the event.
actionstringThe action of the event.

Example:

{ 
"title": "Collection 1-1",
"action": "OPEN_COLLECTION"
}

Context

No context passed