Skip to content

Analytics Tracking Plan

Segment’s e-commerce spec helps define the journey for a customer as they browse your store, click on promotions, view products, add those products to a cart, and complete a purchase.

info “Note” Not all destinations support every event listed here and accept arrays as properties. Refer to individual destination documentation for more information on supported events and properties.

Here is a list of supported events for our various categories within the customer journey.

ActionDescription
Products SearchedUser searched for products
Product List ViewedUser viewed a product list or category
Product List FilteredUser filtered a product list or category
ActionDescription
Product ClickedUser clicked on a product
Product ViewedUser viewed a product details
Product AddedUser added a product to their shopping cart
Product RemovedUser removed a product from their shopping cart
Cart ViewedUser viewed their shopping cart
Checkout StartedUser initiated the order process (a transaction is created)
Checkout Step ViewedUser viewed a checkout step
Checkout Step CompletedUser completed a checkout step
Payment Info EnteredUser added payment information
Order CompletedUser completed the order
Order UpdatedUser updated the order
Order RefundedUser refunded the order
Order CancelledUser cancelled the order
ActionDescription
Coupon EnteredUser entered a coupon on a shopping cart or order
Coupon AppliedCoupon was applied on a user’s shopping cart or order
Coupon DeniedCoupon was denied from a user’s shopping cart or order
Coupon RemovedUser removed a coupon from a cart or order

Browsing lifecycle events represent key events that a customer might have while browsing your apps.

Fire this event when a visitor searches for products.

This event supports the following semantic properties:

PropertyTypeDescription
queryString | ObjectQuery the user searched with

Example:

analytics.track('Products Searched', {
cart_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
query: 'guard rail',
});

Current Implementation:

Fire this event when a visitor views a product list or category.

info “Note” Not all destinations accept arrays as properties. Refer to individual destination documentation for more information on supported events and properties.

This event supports the following semantic properties:

PropertyTypeDescription
list_idStringProduct list being viewed
categoryStringProduct category being viewed
productsArray<Product>Products displayed in the product list
products.$.brandStringProduct Brand of the product being viewed
products.$.productIdStringProduct id displayed on the list
products.$.skuStringSku of the product being viewed
products.$.categoryStringProduct category being viewed
products.$.nameStringName of the product being viewed
products.$.brandStringBrand associated with the product
products.$.variantStringVariant of the product
products.$.priceNumberPrice ($) of the product being viewed
products.$.quantityNumberQuantity of a product
products.$.couponStringCoupon code associated with a product (for example, MAY_DEALS_3)
products.$.positionNumberPosition in the product list (ex. 3)
products.$.urlStringURL of the product page
products.$.imageUrlStringImage url of the product

Example:

analytics.track('Product List Viewed', {
cart_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
category: 'Guard Rail',
list_id: '54',
products: [
{
brand: 'Rhino Rails',
category: 'Guard Rail',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
position: 1,
price: '228',
productId: '185',
quantity: 1,
sku: 'RR-GR-10',
url: 'https://rhinorails.com/single-heavy-duty-warehouse-guard-rail/',
variant: '10ft',
},
{
brand: 'Rhino Rails',
category: 'Guard Rail',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
position: 2,
price: '150',
productId: '185',
quantity: 1,
sku: 'RR-GR-5',
variant: '5ft',
},
],
});

Current Implementation:

info “Note” The Product List Viewed event is aliased to the Viewed Product Category event (from e-commerce v1 spec).

Send this event when a visitor filters a product list or category.

info “Note” Not all destinations accept arrays as properties. Refer to individual destination docs for more information on supported events and properties.

This event supports the following semantic properties:

PropertyTypeDescription
list_idStringProduct list being viewed
categoryStringProduct category being viewed
filtersArrayProduct filters that the customer is using
filters.$.typeStringId of the filter type that the customer is using
filters.$.valueStringId of the selection that the customer chose
sortsArray<Sort>Product sorting that the customer is using
sorts.$.typeStringId of the sort type that the customer is using
sorts.$.valueStringId of the selection type the the customer is using (ascending, descending)
productsArrayProducts displayed in the product list
products.$.productIdStringProduct id displayed on the list
products.$.skuStringSku of the product being viewed
products.$.categoryStringProduct category being viewed
products.$.nameStringName of the product being viewed
products.$.brandStringBrand associated with the product
products.$.variantStringVariant of the product
products.$.priceNumberPrice ($) of the product being viewed
products.$.quantityNumberQuantity of a product
products.$.couponStringCoupon code associated with a product (for example, MAY_DEALS_3)
products.$.positionNumberPosition in the product list (ex. 3)
products.$.urlStringURL of the product page
products.$.imageUrlStringImage url of the product

Example:

analytics.track('Product List Filtered', {
cart_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
filters: [
{
type: 'department',
value: 'guardrail-kits',
},
{
type: 'price',
value: 'under-$25',
},
],
list_id: 54,
products: [
{
brand: 'Rhino Rails',
category: 'Guard Rail',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
position: 1,
price: '228',
productId: '185',
quantity: 1,
sku: 'RR-GR-10',
url: 'https://rhinorails.com/single-heavy-duty-warehouse-guard-rail/',
variant: '10ft',
},
{
brand: 'Rhino Rails',
category: 'Guard Rail',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
position: 2,
price: '150',
productId: '185',
quantity: 1,
sku: 'RR-GR-5',
variant: '5ft',
},
],
sorts: [
{
type: 'price',
value: 'desc',
},
],
});

Current Implementation:

These events represent the customer journey in regards to product ordering.

Fire this event when a visitor clicks a product.

This event supports the following semantic properties:

PropertyTypeDescription
productIdStringDatabase id of the product being viewed
skuStringSku of the product being viewed
categoryStringProduct category being viewed
nameStringName of the product being viewed
brandStringBrand associated with the product
variantStringVariant of the product
priceNumberPrice of the product being viewed
quantityNumberQuantity of a product
couponStringCoupon code associated with a product (for example, MAY_DEALS_3)
positionNumberPosition in the product list (ex. 3)
urlStringURL of the product page
imageUrlStringImage url of the product

Example:

analytics.track('Product Clicked', {
cart_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
brand: 'Rhino Rails',
category: 'Guard Rail',
id: 'RR-GR-10',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
price: '228',
productId: '185',
quantity: 1,
sku: 'RR-GR-10',
url: 'https://rhinorails.com/single-heavy-duty-warehouse-guard-rail/',
variant: '10ft',
});

Current Implementation:

info “Note”

  • The sku and productId are different. They are also used differently, typically the productId is a database identifier, like 185 and the sku is a public-facing identifier like RR-GR-4.
  • The productId is added for reference and to have as a secondary ID, but the sku is what is used as the id in Google Merchant Center, Google Analytics, etc. - Favor the sku if ever faced with a situation where you have to choose.
  • It should also be noted that by sku, we are referring to the sku on the most detailed level. For example, a product which has variants like sku RR-GR (productId 185) which is being added to the cart and has a variant option of 4ft, would actually have a Variant SKU of RR-GR-4. Favor the Variant’s SKU if ever faced with a situation where you have to choose.
  • The Product Clicked event is aliased to the Clicked Product event from e-commerce v1 spec.

Fire this event when a visitor views a product. That view might happen on a page, screen, or preview modal.

This event supports the following semantic properties:

PropertyTypeDescription
productIdStringDatabase id of the product being viewed
skuStringSku of the product being viewed
categoryStringProduct category being viewed
nameStringName of the product being viewed
brandStringBrand associated with the product
variantStringVariant of the product
priceNumberPrice ($) of the product being viewed
quantityNumberQuantity of a product
couponStringCoupon code associated with a product (for example, MAY_DEALS_3)
currencyStringCurrency of the transaction
positionNumberPosition in the product list (ex. 3)
valueNumberTotal value of the product after quantity
urlStringURL of the product page
imageUrlStringImage url of the product

Example:

analytics.track('Product Viewed', {
cart_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
brand: 'Rhino Rails',
category: 'Guard Rail',
id: 'RR-GR-10',
currency: 'USD',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
position: 3,
price: '228',
productId: '185',
quantity: 1,
sku: 'RR-GR-10',
url: 'https://rhinorails.com/single-heavy-duty-warehouse-guard-rail/',
value: 18.99,
variant: '10ft',
});

Current Implementation:

info “Note”

  • The sku and productId don’t have to be different. If they are different, typically the productId is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
  • The Product Viewed event is aliased to the Viewed Product event from e-commerce v1 spec.

Fire this event when a visitor adds a product to their shopping cart.

This event supports the following semantic properties:

PropertyTypeDescription
cart_idStringCart ID to which the product was added to
productIdStringDatabase id of the product being viewed
skuStringSku of the product being viewed
categoryStringProduct category being viewed
nameStringName of the product being viewed
brandStringBrand associated with the product
variantStringVariant of the product
priceNumberPrice ($) of the product being viewed
quantityNumberQuantity of a product
couponStringCoupon code associated with a product (for example, MAY_DEALS_3)
positionNumberPosition in the product list (ex. 3)
urlStringURL of the product page
imageUrlStringImage url of the product

Example:

analytics.track('Product Added', {
brand: 'Rhino Rails',
cart_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
category: 'Guard Rail',
id: 'RR-GR-10',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
position: 3,
price: '228',
productId: '185',
quantity: 1,
sku: 'RR-GR-10',
url: 'https://rhinorails.com/single-heavy-duty-warehouse-guard-rail/',
variant: '10ft',
});

Current Implementation:

info “Note”

  • The sku and productId don’t have to be different. If they are different, typically the productId is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
  • The Product Added event is aliased to the Added Product event from e-commerce v1 spec.

Fire this event when a visitor removes a product from their shopping cart.

This event supports the following semantic properties:

PropertyTypeDescription
cart_idStringCart ID to which the product was removed from
productIdStringDatabase id of the product being viewed
skuStringSku of the product being viewed
categoryStringProduct category being viewed
nameStringName of the product being viewed
brandStringBrand associated with the product
variantStringVariant of the product
priceNumberPrice ($) of the product being viewed
quantityNumberQuantity of a product
couponStringCoupon code associated with a product (for example, MAY_DEALS_3)
positionNumberPosition in the product list (ex. 3)
urlStringURL of the product page
imageUrlStringImage url of the product

Example:

analytics.track('Product Removed', {
brand: 'Rhino Rails',
cart_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
category: 'Guard Rail',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
position: 3,
price: '228',
productId: '185',
quantity: 1,
sku: 'RR-GR-10',
url: 'https://rhinorails.com/single-heavy-duty-warehouse-guard-rail/',
variant: '10ft',
});

Current Implementation:

info “Note”

  • The sku and productId don’t have to be different. If they are different, typically the productId is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
  • The Product Removed event is aliased to the Removed Product event from e-commerce v1 spec.

Fire this event when a visitor views a shopping cart.

info “Note” Not all destinations accept arrays as properties. Refer to individual destination documentation for more information on supported events and properties.

This event supports the following semantic properties:

PropertyTypeDescription
cart_idStringShopping cart ID
productsArrayProducts displayed in the product list
products.$.productIdStringProduct ID displayed on the list
products.$.skuStringSku of the product being viewed
products.$.categoryStringProduct category being viewed
products.$.nameStringName of the product being viewed
products.$.brandStringBrand associated with the product
products.$.variantStringVariant of the product
products.$.priceNumberPrice ($) of the product being viewed
products.$.quantityNumberQuantity of a product
products.$.couponStringCoupon code associated with a product (for example, MAY_DEALS_3)
products.$.positionNumberPosition in the product list (ex. 3)
products.$.urlStringURL of the product page
products.$.imageUrlStringImage url of the product

Example:

analytics.track('Cart Viewed', {
cart_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
products: [
{
brand: 'Rhino Rails',
category: 'Guard Rail',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
position: 1,
price: '228',
productId: '185',
quantity: 1,
sku: 'RR-GR-10',
url: 'https://rhinorails.com/single-heavy-duty-warehouse-guard-rail/',
variant: '10ft',
},
{
brand: 'Rhino Rails',
category: 'Guard Rail',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
position: 2,
price: '150',
productId: '185',
quantity: 1,
sku: 'RR-GR-5',
url: 'https://rhinorails.com/single-heavy-duty-warehouse-guard-rail/',
variant: '5ft',
},
],
});

Current Implementation:

Fire this event whenever an order/transaction was started. Fire on the page that the customer lands on after they press the checkout button.

info “Note” Not all destinations accept arrays as properties. Refer to individual destination documentation for more information on supported events and properties.

Be sure to include all items in the cart as event properties, with the same properties from the previous calls, like so:

This event supports the following semantic properties:

PropertyTypeDescription
order_idStringOrder/transaction ID
affiliationStringStore or affiliation from which this transaction occurred (for example, Rhino Rails)
valueNumberRevenue ($) with discounts and coupons added in. For better flexibility and total control over tracking, we let you decide how to calculate how coupons and discounts are applied
revenueNumberRevenue ($) associated with the transaction (excluding shipping and tax)
shippingNumberShipping cost associated with the transaction
taxNumberTotal tax associated with the transaction
discountNumberTotal discount associated with the transaction
couponStringTransaction coupon redeemed with the transaction
currencyStringCurrency code{:target=“_blank”} associated with the transaction
productsArrayProducts in the order
products.$.productIdStringDatabase id of the product being viewed
products.$.skuStringSku of the product being viewed
products.$.categoryStringProduct category being viewed
products.$.nameStringName of the product being viewed
products.$.brandStringBrand associated with the product
products.$.variantStringVariant of the product
products.$.priceNumberPrice ($) of the product being viewed
products.$.quantityNumberQuantity of a product
products.$.couponStringCoupon code associated with a product (for example, MAY_DEALS_3)
products.$.positionNumberPosition in the product list (ex. 3)
products.$.urlStringURL of the product page
products.$.imageUrlStringImage url of the product

Example:

analytics.track('Checkout Started', {
affiliation: 'Rhino Rails',
cart_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
currency: 'USD',
checkout_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
discount: 75.25,
products: [
{
brand: 'Rhino Rails',
category: 'Guard Rail',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
position: 1,
price: '228',
productId: '185',
quantity: 1,
sku: 'RR-GR-10',
url: 'https://rhinorails.com/single-heavy-duty-warehouse-guard-rail/',
variant: '10ft',
},
{
brand: 'Rhino Rails',
category: 'Guard Rail',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
position: 2,
price: '150',
productId: '185',
quantity: 1,
sku: 'RR-GR-5',
variant: '5ft',
},
],
revenue: 677.75, // Total price of products minus discount
shipping: 150,
subtotal: 378,
tax: 20,
value: 622.75, // Revenue ($) with discounts and coupons added in. Formula: subtotal - discount + shipping + tax
});

Current Implementation:

info “Note”

  • The sku and productId don’t have to be different. If they are different, typically the productId is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
  • The Checkout Started event is aliased to the Started Order event from Segment’s GA Enhanced E-Commerce destinations.

Fire this event whenever a checkout step is viewed.

This event supports the following semantic properties:

PropertyTypeDescription
checkout_idStringCheckout transaction ID
stepNumberNumber representing a step in the checkout process
shipping_methodStringString representing the shipping the method chosen
payment_methodStringString representing the payment method chosen

Example:

analytics.track('Checkout Step Viewed', {
cart_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
checkout_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
payment_method: 'Visa',
shipping_method: 'Fedex',
step: 2,
});

Current Implementation:

info “Note” shipping_method and payment_method are semantic properties. If you want to send that information, do so in this exact spelling.

You can have as many or as few steps in the checkout funnel as you’d like. Note that you’ll still need to track the Order Completed event per Segment’s standard e-commerce tracking API after you’ve tracked the checkout steps.

info “Note” The Checkout Step Viewed event is aliased to the Viewed Checkout Step event from Segment’s GA Enhanced E-Commerce destinations.

Fire this event whenever a checkout step is completed.

This event supports the following semantic properties:

PropertyTypeDescription
checkout_idStringCheckout transaction ID
stepNumberNumber representing a step in the checkout process
shipping_methodStringString representing the shipping the method chosen
payment_methodStringString representing the payment method chosen

Example:

analytics.track('Checkout Step Completed', {
cart_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
checkout_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
payment_method: 'Visa',
shipping_method: 'Fedex',
step: 2,
});

Current Implementation:

info “Note” shipping_method and payment_method are semantic properties. If you want to send that information, do so in this exact spelling.

You can have as many or as few steps in the checkout funnel as you’d like. Note that you’ll still need to track the Order Completed event per Segment’s standard e-commerce tracking API after you’ve tracked the checkout steps.

info “Note” The Checkout Step Completed event is aliased to the Completed Checkout Step event from Segment’s GA Enhanced E-Commerce destinations.

Fire this event whenever payment information has been successfully entered.

This event supports the following semantic properties:

PropertyTypeDescription
checkout_idStringCheckout transaction ID
order_idStringOrder ID (optional)
stepNumberNumber representing a step in the checkout process
shipping_methodStringString representing the shipping the method chosen
payment_methodStringString representing the payment method chosen

Example:

analytics.track('Payment Info Entered', {
cart_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
checkout_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
order_id: '49955',
});

Current Implementation:

info “Note” shipping_method and payment_method are semantic properties. If you want to send that information, do so in this exact spelling.

You can have as many or as few steps in the checkout funnel as you’d like. Note that you’ll still need to track the Order Completed event per Segment’s standard e-commerce tracking API after you’ve tracked the checkout steps.

Fire this event whenever an order/transaction was updated.

info “Note” Not all destinations accept arrays as properties. Refer to individual destination documentation for more information on supported events and properties.

Be sure to include all items in the cart as event properties, with the same properties from the previous calls, like so:

This event supports the following semantic properties:

PropertyTypeDescription
order_idStringOrder/transaction ID
affiliationStringStore or affiliation from which this transaction occurred (for example, Rhino Rails)
totalNumberRevenue ($) with discounts and coupons added in

Note that our Google Analytics Ecommerce destination accepts total or revenue, but not both. For better flexibility and total control over tracking, we let you decide how to calculate how coupons and discounts are applied
revenueNumberRevenue ($) associated with the transaction (excluding shipping and tax)
shippingNumberShipping cost associated with the transaction
taxNumberTotal tax associated with the transaction
discountNumberTotal discount associated with the transaction
currencyStringCurrency code associated with the transaction
productsArrayProducts in the order
products.$.productIdStringDatabase id of the product being viewed
products.$.skuStringSku of the product being viewed
products.$.categoryStringProduct category being viewed
products.$.nameStringName of the product being viewed
products.$.brandStringBrand associated with the product
products.$.variantStringVariant of the product
products.$.priceNumberPrice ($) of the product being viewed
products.$.quantityNumberQuantity of a product
products.$.positionNumberPosition in the product list (ex. 3)
products.$.urlStringURL of the product page
products.$.imageUrlStringImage url of the product

Example:

analytics.track('Order Updated', {
affiliation: 'Rhino Rails',
currency: 'USD',
discount: 2.5,
order_id: '495001',
products: [
{
brand: 'Rhino Rails',
category: 'Guard Rail',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
position: 1,
price: '228',
productId: '185',
quantity: 1,
sku: 'RR-GR-10',
url: 'https://rhinorails.com/single-heavy-duty-warehouse-guard-rail/',
variant: '10ft',
},
{
brand: 'Rhino Rails',
category: 'Guard Rail',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
position: 1,
price: '150',
productId: '185',
quantity: 1,
sku: 'RR-GR-5',
variant: '5ft',
},
],
revenue: 302.75, // Total price of products minus discount
shipping: 150,
subtotal: 378,
tax: 20,
value: 472.75, // Revenue ($) with discounts and coupons added in. Formula: subtotal - discount + shipping + tax
});

Current Implementation:

info “Note”

  • The sku and productId don’t have to be different. If they are different, typically the productId is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
  • The Order Updated event is aliased to the Updated Order event from Segment’s GA Enhanced E-Commerce destinations.

Fire this event whenever an order/transaction was successfully completed by the customer.

info “Note” Not all destinations accept arrays as properties. Refer to individual destination documentation for more information on supported events and properties.

Be sure to include all items in the cart as event properties, with the same properties from the previous calls, like so:

This event supports the following semantic properties:

PropertyTypeDescription
checkout_idStringCheckout ID
order_idStringOrder/transaction ID
affiliationStringStore or affiliation from which this transaction occurred (for example, Rhino Rails)
subtotalNumberOrder total after discounts but before taxes and shipping
totalNumberSubtotal ($) with shipping and taxes added in. Note that our Google Analytics Ecommerce destination accepts total or revenue, but not both. For better flexibility and total control over tracking, we let you decide how to calculate how coupons and discounts are applied
revenueNumberRevenue ($) associated with the transaction (including discounts, but excluding shipping and taxes)
shippingNumberShipping cost associated with the transaction
taxNumberTotal tax associated with the transaction
discountNumberTotal discount associated with the transaction
currencyStringCurrency code associated with the transaction
productsArrayProducts in the order
products.$.productIdStringDatabase id of the product being viewed
products.$.skuStringSku of the product being viewed
products.$.categoryStringProduct category being viewed
products.$.nameStringName of the product being viewed
products.$.brandStringBrand associated with the product
products.$.variantStringVariant of the product
products.$.priceNumberPrice ($) of the product being viewed
products.$.quantityNumberQuantity of a product
products.$.positionNumberPosition in the product list (ex. 3)
products.$.urlStringURL of the product page
products.$.imageUrlStringImage url of the product

Example:

analytics.track('Order Completed', {
cart_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
affiliation: 'Rhino Rails',
checkout_id: '56cd956f-4689-4f58-a371-0c26ef9e8850',
currency: 'USD',
discount: 2.5,
order_id: '495001',
products: [
{
category: 'Guard Rail',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
price: '126',
productId: '185',
quantity: 1,
sku: '45790-32',
url: 'https://rhinorails.com/single-heavy-duty-warehouse-guard-rail/',
},
{
category: 'Guard Rail',
name: 'Heavy Duty Warehouse Guardrail',
price: '150',
productId: '185',
quantity: 2,
sku: 'RR-GR-5',
},
],
revenue: 22.5,
shipping: 3,
subtotal: 22.5,
tax: 2,
total: 27.5,
});

Current Implementation:

info “Note”

  • The sku and productId don’t have to be different. If they are different, typically the productId is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.
  • The Order Completed event is aliased to the Completed Order event from E-Commerce spec v1 - 5/11/16.

Fire this event whenever an order/transaction was refunded.

Be sure to include all items in the cart as event properties, with the same properties from the previous “Order Completed” call.

This event supports the following semantic properties:

PropertyTypeDescription
order_idStringOrder/transaction ID

Example:

analytics.track('Order Refunded', {
currency: 'USD',
order_id: '495001',
products: [
{
category: 'Guard Rail',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
price: '126',
productId: '185',
quantity: 1,
sku: '45790-32',
url: 'https://rhinorails.com/single-heavy-duty-warehouse-guard-rail/',
},
{
category: 'Guard Rail',
name: 'Heavy Duty Warehouse Guardrail',
price: '150',
productId: '185',
quantity: 2,
sku: 'RR-GR-5',
},
],
total: 30,
});

Current Implementation:

info “Note” The sku and productId don’t have to be different. If they are different, typically the productId is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.

Fire this event whenever an order/transaction was cancelled.

info “Note” Not all destinations accept arrays as properties. Refer to individual destination documentation for more information on supported events and properties.

Be sure to include all items in the cart as event properties, with the same properties from the previous calls.

This event supports the following semantic properties:

PropertyTypeDescription
order_idStringOrder/transaction ID
affiliationStringStore or affiliation from which this transaction occurred (for example, Rhino Rails)
totalNumberRevenue ($) with discounts and coupons added in.
revenueNumberRevenue ($) associated with the transaction (excluding shipping and tax)
shippingNumberShipping cost associated with the transaction
taxNumberTotal tax associated with the transaction
discountNumberTotal discount associated with the transaction
currencyStringCurrency code associated with the transaction
productsArrayProducts in the order
products.$.productIdStringDatabase id of the product being viewed
products.$.skuStringSku of the product being viewed
products.$.categoryStringProduct category being viewed
products.$.nameStringName of the product being viewed
products.$.brandStringBrand associated with the product
products.$.variantStringVariant of the product
products.$.priceNumberPrice ($) of the product being viewed
products.$.quantityNumberQuantity of a product
products.$.positionNumberPosition in the product list (ex. 3)
products.$.urlStringURL of the product page
products.$.imageUrlStringImage url of the product

Example:

analytics.track('Order Cancelled', {
affiliation: 'Rhino Rails',
currency: 'USD',
discount: 2.5,
order_id: '495001',
products: [
{
category: 'Guard Rail',
imageUrl: 'https://img.rhinorails.com/images/stencil/160w/attribute_rule_images/632_source_1641845963.jpg',
name: 'Heavy Duty Warehouse Guardrail',
price: '126',
productId: '185',
quantity: 1,
sku: '45790-32',
url: 'https://rhinorails.com/single-heavy-duty-warehouse-guard-rail/',
},
{
category: 'Guard Rail',
name: 'Heavy Duty Warehouse Guardrail',
price: '150',
productId: '185',
quantity: 2,
sku: 'RR-GR-5',
},
],
revenue: 25.0,
shipping: 3,
tax: 2,
total: 30,
});

Current Implementation:

info “Note” The sku and productId don’t have to be different. If they are different, typically the productId is a database identifier, like 9714107479 and the sku is a public-facing identifier like SEG-02.