TrackBee DocsTrackBee Docs
Tracking SDKEvents

product_view

Someone opened a product page.

Send this when a visitor lands on a product page, and again if they switch variant on the same page.

trackbee.track('product_view', {
  product_id: '8472019',
  variant_id: '4410228',
  price: '29.99',
  currency: 'EUR',
  product_title: 'Field Jacket',
  variant_title: 'Olive / M',
  product_type: 'Outerwear',
  product_url: 'https://example.com/products/field-jacket',
  image_url: 'https://cdn.example.com/field-jacket-olive.jpg',
  vendor: 'Northbound',
  sku: 'NB-FJ-OLV-M',
});

Fields

FieldTypeRequired
product_idstring or numberyes
variant_idstring or numberyes
pricepriceyes
currencystringno
product_titlestringno
variant_titlestringno
product_typestringno
product_urlstringno
image_urlstringno
vendorstringno
skustringno

price is the unit price of the variant being viewed, as a non-negative number or a string like '29.99'. See value rules.

currency is an ISO code like EUR or USD. Pass it whenever you know it. Without it the amount arrives without a unit.

The minimum

trackbee.track('product_view', {
  product_id: '8472019',
  variant_id: '4410228',
  price: '29.99',
});

That works, but send the optional fields when you have them. They are what makes a product recognizable in reports and in the audiences your ad platforms build.

If the product has no variants

Pass the product ID for both. A platform that models everything as a product with one variant still needs something in variant_id.

On this page