Product Added/Removed

Description

The Product Added event is a client-side event that fires whenever a product is added to the customer’s shopping cart. The Product Removed event is a client-side event that fires whenever a product is removed from the shopping cart.

Instrumentation

This event is implemented with our javascript analytics library. The tracking code is managed in the storefront theme.

The Product Removed event follows the same specification as the Product Added Event described below.

Event Properties

Property

Type

Description

product_id

String

Database id of the product being viewed

sku

String

Sku of the product being viewed

category

String

Product category being viewed

name

String

Name of the product being viewed

brand

String

Brand associated with the product

variant

String

Variant of the product (e.g. Black)

price

Number

Price ($) of the product being viewed

quantity

Number

Quantity of a product

position

Number

Position in the product list (ex. 3)

url

String

URL of the product page

image_url

String

Image url of the product

Example:

analytics.track('Product Added', {
  product_id: '507f1f77bcf86cd799439011',
  sku: 'G-32',
  category: 'Games',
  name: 'Monopoly: 3rd Edition',
  brand: 'Hasbro',
  variant: '200 pieces',
  price: 18.99,
  quantity: 1,
  position: 3,
  url: 'https://www.example.com/product/path',
  image_url: 'https://www.example.com/product/path.jpg'
});

Last updated