Ecommerce – QProtocol events

This is for:

Developer

ecView

CMH Core CMH Qubit Recs CMH Google Recs CMH Badging CMH Product Insights CEH Core CEH Social proof CEH Recs CEH Abandonment recovery

The ecView event reports a page view and is a special event because it is required by smartserve.js for data collection and processing. It’s therefore essential that every page emits an ecView event and that it is emitted before any other event.

Warning

Any CEH events emitted before the first ecView event are considered invalid. Web and mobile applications emit CEH view events whenever a view is rendered.

Note

For Product Insights, type must be category. See the Merchandising Hub setup guide for more information.

Example schema

Field (JS Data Type) Description Required for

type (String)

The type of view. Can be one of home, category, search, product, basket, checkout, confirmation, help, contact, registration, content, account, or other. Custom names can be used for unique page types that are not covered by this specification. All types must be lowercase

CMH Core

CMH Qubit Recs

CMH Google Recs

CMH Badging

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

subtypes (String[])

An unordered list of subtypes to describe the view

CMH Core

CEH Core

CEH Recs

language (String)

The language used in this view. Must be an IETF language code

CMH Core

CMH Qubit Recs

CMH Google Recs

CMH Badging

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

country (String)

The selected country for the view. Must be an ISO 3166-1 alpha-2 code

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

currency (String)

The ISO 4217 currency code for the user (for example, GBP, USD)

CMH Core

CMH Qubit Recs

CMH Google Recs

CMH Badging

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

environment (String)

Reports the environment (for example, development, staging, or production)

Optional

store.id (String)

Unique identifier for the store closest to the user or an explicitly selected store

Optional

store.address.addressee (String)

Full name of the person for whom the address is for

Optional

store.address.company (String)

The name of the company

Optional

store.address.lines (String[])

An array of address lines NOT including city, region, postcode or country (maximum of 3 lines allowed)

Optional

store.address.locality (String)

The town or city

Optional

store.address.region (String)

E.g state in the US, county in the UK

Optional

store.address.postalCode (String)

Can be the country equivalent code (for example, zip code for the U.S)

Optional

store.address.country (String)

The name of the country

Optional

store.address.countryCode (String)

An ISO 3166-1 alpha-2 country code

Optional

siteVersion (String)

The selected site version for the view (for example, desktop, mobile, tablet)

Optional

Example JavaScript

uv.emit('ecView', {
  type: 'category',
  subtypes: [
    'Womens',
    'Dresses',
    'Cocktail Dresses'
  ],
  environment: 'production',
  store: {
    id: '12424',
    address: {
      addressee: 'John Smith',
      company: 'Amce Inc',
      lines: [
        'Flat 12',
        '123 High Street'
      ],
      locality: 'London',
      region: 'New York',
      postalCode: '10010',
      country: 'United States',
      countryCode: 'US'
    }
  },
  language: 'en-us',
  country: 'US',
  siteVersion: 'desktop',
  currency: 'USD'
})

ecUser

CMH Core CMH Google Recs CEH Core CEH Abandonment recovery

The ecUser event is emitted once per view and reports visitor metadata. The event should be emitted on every page as long as there is data available for the user.

For many sites, the event will be present and well populated when the visitor logs on. Sites with a newsletter subscription form that the visitor has previously submitted, might be able to populate the name and email address for the visitor using the data collected on form submission.

Warning

It is acceptable to emit hashed user Ids but be aware that to ingest data for use in Qubit’s platform, the user Ids in the provided dataset must be hashed in the same way.

Example schema

Field (JS Data Type) Description Required for

user.id (String)

A unique user Id. Can also be a hash of the username and/or email address

CMH Core

CMH Google Recs

CEH Core

user.firstName (String)

The user’s first name

CEH Core

user.lastName (String)

The user’s last name

CEH Core

user.username (String)

The username for the user

CEH Core

user.email (String)

The user’s primary email address

CMH Core

CMH Google Recs

CEH Core

CEH Abandonment recovery

user.title (String)

The user’s title

Optional

user.gender (String)

The user’s gender. Can be male, female, or other

Optional

user.firstSession (Boolean)

True if it’s the user’s first session

Optional

user.hasTransacted (Boolean)

True if the user has completed 1 or more transactions

Optional

user.loyalty.id (String)

Loyalty program membership number

Optional

user.loyalty.tier (String)

The level of the loyalty program this user holds

Optional

user.loyalty.tierPoints (Number)

The number of tier points

Optional

user.loyalty.membershipType (String)

The type of loyalty membership

Optional

user.loyalty.membershipPoints (Number)

The number of points from this membership

Optional

user.address.addressee (String)

Full name of the person for whom the address is for

Optional

user.address.company (String)

The name of the company

Optional

user.address.lines (String[])

An array of address lines NOT including city, region, postcode or country (maximum of 3 lines allowed)

Optional

user.address.locality (String)

The town or city

Optional

user.address.region (String)

E.g state in the US, county in the UK

Optional

user.address.postalCode (String)

Can be the country equivalent code (for example, zip code for the U.S)

Optional

user.address.country (String)

The name of the country

Optional

user.address.countryCode (String)

An ISO 3166-1 alpha-2 country code

Optional

user.isGuest (String)

True if the user is a guest user without a registered account

Optional

user.age (Number)

The user’s age in years

Optional

user.phoneNumber (String)

The user’s phone number. Should be formatted without spaces, braces, or hyphens

Optional

user.countryCallingCode (String)

The country calling code for the given phone number, formatted to include the + prefix, as per ITU-T standard E.123

Optional

user.device (String)

Device the user is browsing on, for example kiosk.

Optional

Example JavaScript

uv.emit('ecUser', {
  user: {
    id: '2861102bace6e6620948564f0ce0a7cd',
    title: 'Mr',
    firstName: 'John',
    lastName: 'Smith',
    gender: 'Male',
    username: 'JohnSmith',
    email: 'john@johnsmith.com',
    firstSession: null,
    hasTransacted: true,
    loyalty: {
      id: '8989752-223',
      tier: 'silver',
      tierPoints: null,
      membershipType: 'Clearsky Rewards',
      membershipPoints: null
    },
    address: {
      addressee: 'John Smith',
      company: 'Amce Inc',
      lines: [
        'Flat 12',
        '123 High Street'
      ],
      locality: 'London',
      region: 'New York',
      postalCode: '10010',
      country: 'United States',
      countryCode: 'US'
    },
    isGuest: 'true',
    age: 42,
    phoneNumber: '2121234567',
    countryCallingCode: '1',
    device: 'kiosk'
  }
})

ecProduct

CMH Core CMH Qubit Recs CMH Google Recs CMH Badging CMH Product Insights CEH Core CEH Social proof CEH Recs CEH Abandonment recovery

Product events report a product loaded on a page. This could be, for example, a main product, a linked product on a product detail page, a product in a listing page, or search page.

Warning

This event is not used for Recommendations reporting. Refer to Reporting On Recommendations Experiences for more information.

The eventType field differentiates between the different scenarios and can be:

  • detail

  • linked_product

Note

For Product Insights, eventType must be detail. See the Merchandising Hub setup guide for more information.

Example schema

Field (JS Data Type) Description Required for

product.productId (String)

Id to identify a product, normally covering all of its size, color, pattern, and material variants

CMH Core

CMH Qubit Recs

CMH Google Recs

CMH Badging

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.sku (String)

Unique product identifier to distinguish each product from all of the other size, color, pattern, material, age, group, gender variants

CMH Qubit Recs

CMH Google Recs

CMH Badging

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.name (String)

The product’s name, which should match the name shown on the product page

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.description (String)

An accurate description of the product, which should match the description on the product page

CMH Google Recs

CEH Core

CEH Recs

CEH Abandonment recovery

product.categories (String[])

A list of one or more product categories this product belongs to. Each category is a full path of a category where each level is separated by >

CMH Core

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.price (Price)

The price that the product is currently being sold at, after discounts

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.price.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.price.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.originalPrice (Price)

The price of the product before discounts, promotions

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.originalPrice.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.originalPrice.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.url (String)

The fully qualified URL that the product is shown on

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.images (String[])

An array of fully qualified image URLs for the product. The main image you want to use to display the product must be the first element in the array

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.stock (Number)

The number of items left in stock for the product. Should only be populated when the product is in stock and the exact number is known. Should be 0 if the product is out of stock. Where different product variants have different stock levels, use the maximum stock level

CMH Google Recs

CMH Product Insights

CEH Core

CEH Recs

product.manufacturer (String)

The product manufacturer, recommended when a product inventory includes multiple brands

CMH Core

CMH Product Insights

CEH Core

CEH Recs

product.color (String)

The color of the product

CEH Core

CEH Recs

product.size (String)

The size of the product (for example, 12, M, XL, 14)

CEH Core

CEH Recs

eventType (String)

The type of product event (for example, 'listing', 'detail', or 'linked_product')

CMH Core

CMH Qubit Recs

CMH Google Recs

CMH Badging

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.groupId (String)

Id for a group of products that come in different versions (variants)

Optional

product.rating (Number)

Average rating for this product. Should be between 0 and 1

Optional

product.reviewCount (Number)

Number of reviews submitted for the product

Optional

product.gender (String)

The target gender of the product

Optional

product.clearance (Boolean)

True if the product is a clearance item

Optional

product.onSale (Boolean)

True if the item is on sale

Optional

index (Number)

The index of the product as it’s positioned on the page (for example, the first product in a listing would be 0, the next would be 1).

Optional

Example JavaScript

uv.emit('ecProduct', {
  product: {
    groupId: 'DRESS1',
    productId: 'DRESS101',
    sku: 'DRESS101-12',
    name: 'Red Cocktail Dress',
    description: 'This red cocktail dress is perfect for any occasion',
    categories: [
      'Clothing > Sweaters > Short Sleeve Sweaters',
      'New Arrivals > Clothing'
    ],
    price: {
      value: 9.99,
      currency: 'USD'
    },
    originalPrice: {
      value: 9.99,
      currency: 'USD'
    },
    url: 'http://www.fashionunion.com/dresses/red-cocktail-dress.html',
    images: [
      'http://www.fashionunion.com/dresses/red-cocktail-dress-1.jpg',
      'http://www.fashionunion.com/dresses/red-cocktail-dress-2.jpg'
    ],
    stock: 20,
    manufacturer: 'Dress Inc',
    color: 'Red',
    size: '12',
    rating: 0.8,
    reviewCount: 5132,
    gender: 'unisex',
    clearance: true,
    onSale: null
  },
  eventType: 'detail',
  index: 1
})

ecBasketItem

CMH Google Recs CEH Core

Basket events should be emitted on every page as long as there are one or more items in the basket. They should not be emitted on an order summary page. There are two types of basket events that are emitted, ecBasketItem and ecBasketSummary.

Individual items are emitted as ecBasketItem events, each of which contains the summary for the full basket. This denormalization is essential for query performance.

After emitting one or more ecBasketItem events, a ecBasketSummary event should be emitted.

Note

If item level detail is not known, it is acceptable to emit just an ecBasketSummary event without any ecBasketItem events.

Example schema

Field (JS Data Type) Description Required for

basket.id (String)

Unique basket Id

CEH Core

basket.subtotal (Price)

The basket value before the application of taxes, discounts, promotions, shipping costs, etc

CEH Core

CEH Recs

basket.subtotal.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CEH Core

CEH Recs

basket.subtotal.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CEH Core

CEH Recs

basket.total (Price)

The basket total after the application of discounts, promotions, shipping costs, etc

CMH Core

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.total.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Core

CMH Google Recs

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.total.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Core

CMH Google Recs

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.quantity (Number)

The number of items in the basket

CEH Core

basket.subtotalIncludingTax (Price)

The basket subtotal, including tax, but before the application of discounts, promotions, shipping costs, etc

CEH Core

CEH Recs

basket.subtotalIncludingTax.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CEH Core

CEH Recs

basket.subtotalIncludingTax.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CEH Core

CEH Recs

product.productId (String)

Id to identify a product, normally covering all of its size, color, pattern, and material variants

CMH Core

CMH Qubit Recs

CMH Google Recs

CMH Badging

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.sku (String)

Unique product identifier to distinguish each product from all of the other size, color, pattern, material, age, group, gender variants

CMH Qubit Recs

CMH Google Recs

CMH Badging

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.name (String)

The product’s name, which should match the name shown on the product page

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.description (String)

An accurate description of the product, which should match the description on the product page

CMH Google Recs

CEH Core

CEH Recs

CEH Abandonment recovery

product.categories (String[])

A list of one or more product categories this product belongs to. Each category is a full path of a category where each level is separated by >

CMH Core

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.price (Price)

The price that the product is currently being sold at, after discounts

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.price.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.price.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.originalPrice (Price)

The price of the product before discounts, promotions

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.originalPrice.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.originalPrice.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.url (String)

The fully qualified URL that the product is shown on

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.images (String[])

An array of fully qualified image URLs for the product. The main image you want to use to display the product must be the first element in the array

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.stock (Number)

The number of items left in stock for the product. Should only be populated when the product is in stock and the exact number is known. Should be 0 if the product is out of stock. Where different product variants have different stock levels, use the maximum stock level

CMH Google Recs

CMH Product Insights

CEH Core

CEH Recs

product.manufacturer (String)

The product manufacturer, recommended when a product inventory includes multiple brands

CMH Core

CMH Product Insights

CEH Core

CEH Recs

product.color (String)

The color of the product

CEH Core

CEH Recs

product.size (String)

The size of the product (for example, 12, M, XL, 14)

CEH Core

CEH Recs

quantity (Number)

The number of products described by the line item

CMH Google Recs

CMH Product Insights

CEH Core

CEH Recs

subtotal (Price)

The subtotal of the products described by the line item taking into account the current price and quantity before the application of taxes, discounts, promotions, shipping costs, etc.

CEH Core

CEH Recs

subtotal.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CEH Core

CEH Recs

subtotal.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CEH Core

CEH Recs

subtotalIncludingTax (Price)

The subtotal of the products described by the line item taking into account the current price and quantity including tax, but before the application of discounts, promotions, shipping costs, etc.

CEH Core

subtotalIncludingTax.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CEH Core

subtotalIncludingTax.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CEH Core

basket.discount (Price)

The amount discounted by vouchers or promotions

Optional

basket.discount.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.discount.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.tax (Price)

The total tax applied to the basket

Optional

basket.tax.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.tax.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.shippingPrice (Price)

The selected or default shipping price

Optional

basket.shippingPrice.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.shippingPrice.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.shippingMethod (String)

The selected or default shipping method

Optional

product.groupId (String)

Id for a group of products that come in different versions (variants)

Optional

product.rating (Number)

Average rating for this product. Should be between 0 and 1

Optional

product.reviewCount (Number)

Number of reviews submitted for the product

Optional

product.gender (String)

The target gender of the product

Optional

product.clearance (Boolean)

True if the product is a clearance item

Optional

product.onSale (Boolean)

True if the item is on sale

Optional

shippingMethod (String)

The shipping method for the product. Should only be populated if the product uses a different shipping method to other products in the basket

Optional

shippingCost (Price)

The shipping cost for the product. Should only be populated if the product has an independant shipping cost from other products in the basket

Optional

shippingCost.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

shippingCost.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

discount (Price)

The discount applied to the basket from vouchers or promotions

Optional

discount.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

discount.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

Example JavaScript

uv.emit('ecBasketItem', {
  basket: {
    id: 'BASK123',
    subtotal: {
      value: 9.99,
      currency: 'USD'
    },
    total: {
      value: 9.99,
      currency: 'USD'
    },
    quantity: 10,
    discount: {
      value: 9.99,
      currency: 'USD'
    },
    tax: {
      value: 9.99,
      currency: 'USD'
    },
    shippingPrice: {
      value: 9.99,
      currency: 'USD'
    },
    shippingMethod: 'Next Day',
    subtotalIncludingTax: {
      value: 9.99,
      currency: 'USD'
    }
  },
  product: {
    groupId: 'DRESS1',
    productId: 'DRESS101',
    sku: 'DRESS101-12',
    name: 'Red Cocktail Dress',
    description: 'This red cocktail dress is perfect for any occasion',
    categories: [
      'Clothing > Sweaters > Short Sleeve Sweaters',
      'New Arrivals > Clothing'
    ],
    price: {
      value: 9.99,
      currency: 'USD'
    },
    originalPrice: {
      value: 9.99,
      currency: 'USD'
    },
    url: 'http://www.fashionunion.com/dresses/red-cocktail-dress.html',
    images: [
      'http://www.fashionunion.com/dresses/red-cocktail-dress-1.jpg',
      'http://www.fashionunion.com/dresses/red-cocktail-dress-2.jpg'
    ],
    stock: 20,
    manufacturer: 'Dress Inc',
    color: 'Red',
    size: '12',
    rating: 0.8,
    reviewCount: 5132,
    gender: 'unisex',
    clearance: true,
    onSale: null
  },
  quantity: 2,
  subtotal: {
    value: 9.99,
    currency: 'USD'
  },
  shippingMethod: 'Express',
  shippingCost: {
    value: 9.99,
    currency: 'USD'
  },
  discount: {
    value: 9.99,
    currency: 'USD'
  },
  subtotalIncludingTax: {
    value: 9.99,
    currency: 'USD'
  }
})

ecBasketItemAction

CMH Google Recs CMH Badging CEH Core

Emitted for every interaction with the basket, using the action field to specify whether a line item was added or removed. The event should also contain the summary for the full basket. This denormalization is essential for query performance.

After emitting one or more ecBasketItem events, a ecBasketSummary event should be emitted.

Note

If item level detail is not known, it is acceptable to emit just an ecBasketSummary event without any ecBasketItemevents.

Example schema

Field (JS Data Type) Description Required for

basket.id (String)

Unique basket Id

CEH Core

basket.subtotal (Price)

The basket value before the application of taxes, discounts, promotions, shipping costs, etc

CEH Core

CEH Recs

basket.subtotal.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CEH Core

CEH Recs

basket.subtotal.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CEH Core

CEH Recs

basket.total (Price)

The basket total after the application of discounts, promotions, shipping costs, etc

CMH Core

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.total.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Core

CMH Google Recs

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.total.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Core

CMH Google Recs

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.quantity (Number)

The number of items in the basket

CEH Core

basket.subtotalIncludingTax (Price)

The basket subtotal, including tax, but before the application of discounts, promotions, shipping costs, etc

CEH Core

CEH Recs

basket.subtotalIncludingTax.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CEH Core

CEH Recs

basket.subtotalIncludingTax.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CEH Core

CEH Recs

product.productId (String)

Id to identify a product, normally covering all of its size, color, pattern, and material variants

CMH Core

CMH Qubit Recs

CMH Google Recs

CMH Badging

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.sku (String)

Unique product identifier to distinguish each product from all of the other size, color, pattern, material, age, group, gender variants

CMH Qubit Recs

CMH Google Recs

CMH Badging

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.name (String)

The product’s name, which should match the name shown on the product page

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.description (String)

An accurate description of the product, which should match the description on the product page

CMH Google Recs

CEH Core

CEH Recs

CEH Abandonment recovery

product.categories (String[])

A list of one or more product categories this product belongs to. Each category is a full path of a category where each level is separated by >

CMH Core

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.price (Price)

The price that the product is currently being sold at, after discounts

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.price.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.price.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.originalPrice (Price)

The price of the product before discounts, promotions

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.originalPrice.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.originalPrice.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.url (String)

The fully qualified URL that the product is shown on

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.images (String[])

An array of fully qualified image URLs for the product. The main image you want to use to display the product must be the first element in the array

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.stock (Number)

The number of items left in stock for the product. Should only be populated when the product is in stock and the exact number is known. Should be 0 if the product is out of stock. Where different product variants have different stock levels, use the maximum stock level

CMH Google Recs

CMH Product Insights

CEH Core

CEH Recs

product.manufacturer (String)

The product manufacturer, recommended when a product inventory includes multiple brands

CMH Core

CMH Product Insights

CEH Core

CEH Recs

product.color (String)

The color of the product

CEH Core

CEH Recs

product.size (String)

The size of the product (for example, 12, M, XL, 14)

CEH Core

CEH Recs

quantity (Number)

The number of products described by the line item

CMH Google Recs

CMH Product Insights

CEH Core

CEH Recs

subtotal (Price)

The subtotal of the products described by the line item taking into account the current price and quantity before the application of taxes, discounts, promotions, shipping costs, etc.

CEH Core

CEH Recs

subtotal.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CEH Core

CEH Recs

subtotal.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CEH Core

CEH Recs

subtotalIncludingTax (Price)

The subtotal of the products described by the line item taking into account the current price and quantity including tax, but before the application of discounts, promotions, shipping costs, etc.

CEH Core

subtotalIncludingTax.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CEH Core

subtotalIncludingTax.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CEH Core

action (String)

Can be either 'add', 'remove' for status changes

CMH Google Recs

CMH Badging

CEH Core

basket.discount (Price)

The amount discounted by vouchers or promotions

Optional

basket.discount.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.discount.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.tax (Price)

The total tax applied to the basket

Optional

basket.tax.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.tax.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.shippingPrice (Price)

The selected or default shipping price

Optional

basket.shippingPrice.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.shippingPrice.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.shippingMethod (String)

The selected or default shipping method

Optional

product.groupId (String)

Id for a group of products that come in different versions (variants)

Optional

product.rating (Number)

Average rating for this product. Should be between 0 and 1

Optional

product.reviewCount (Number)

Number of reviews submitted for the product

Optional

product.gender (String)

The target gender of the product

Optional

product.clearance (Boolean)

True if the product is a clearance item

Optional

product.onSale (Boolean)

True if the item is on sale

Optional

shippingMethod (String)

The shipping method for the product. Should only be populated if the product uses a different shipping method to other products in the basket

Optional

shippingCost (Price)

The shipping cost for the product. Should only be populated if the product has an independant shipping cost from other products in the basket

Optional

shippingCost.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

shippingCost.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

discount (Price)

The discount applied to the basket from vouchers or promotions

Optional

discount.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

discount.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

Example JavaScript

uv.emit('ecBasketItemAction', {
  basket: {
    id: 'BASK123',
    subtotal: {
      value: 9.99,
      currency: 'USD'
    },
    total: {
      value: 9.99,
      currency: 'USD'
    },
    quantity: 10,
    discount: {
      value: 9.99,
      currency: 'USD'
    },
    tax: {
      value: 9.99,
      currency: 'USD'
    },
    shippingPrice: {
      value: 9.99,
      currency: 'USD'
    },
    shippingMethod: 'Next Day',
    subtotalIncludingTax: {
      value: 9.99,
      currency: 'USD'
    }
  },
  product: {
    groupId: 'DRESS1',
    productId: 'DRESS101',
    sku: 'DRESS101-12',
    name: 'Red Cocktail Dress',
    description: 'This red cocktail dress is perfect for any occasion',
    categories: [
      'Clothing > Sweaters > Short Sleeve Sweaters',
      'New Arrivals > Clothing'
    ],
    price: {
      value: 9.99,
      currency: 'USD'
    },
    originalPrice: {
      value: 9.99,
      currency: 'USD'
    },
    url: 'http://www.fashionunion.com/dresses/red-cocktail-dress.html',
    images: [
      'http://www.fashionunion.com/dresses/red-cocktail-dress-1.jpg',
      'http://www.fashionunion.com/dresses/red-cocktail-dress-2.jpg'
    ],
    stock: 20,
    manufacturer: 'Dress Inc',
    color: 'Red',
    size: '12',
    rating: 0.8,
    reviewCount: 5132,
    gender: 'unisex',
    clearance: true,
    onSale: null
  },
  quantity: 2,
  subtotal: {
    value: 9.99,
    currency: 'USD'
  },
  shippingMethod: 'Express',
  shippingCost: {
    value: 9.99,
    currency: 'USD'
  },
  discount: {
    value: 9.99,
    currency: 'USD'
  },
  subtotalIncludingTax: {
    value: 9.99,
    currency: 'USD'
  },
  action: 'add'
})

ecBasketItemTransaction

CMH Core CMH Qubit Recs CMH Google Recs CMH Badging CMH Product Insights CEH Core CEH Social proof CEH Recs

Transaction events are important because they report revenue for your website. They are set up in a similar way to basket events, except you should only emit them on a confirmation page, and they must include transaction.id.

The fields you emit to report what products the customer has purchased should be well aligned with the fields you emit in the ecBasketTransactionSummaryevent, which is emitted on the same page.

Example schema

Field (JS Data Type) Description Required for

basket.id (String)

Unique basket Id

CEH Core

basket.subtotal (Price)

The basket value before the application of taxes, discounts, promotions, shipping costs, etc

CEH Core

CEH Recs

basket.subtotal.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CEH Core

CEH Recs

basket.subtotal.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CEH Core

CEH Recs

basket.total (Price)

The basket total after the application of discounts, promotions, shipping costs, etc

CMH Core

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.total.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Core

CMH Google Recs

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.total.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Core

CMH Google Recs

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.quantity (Number)

The number of items in the basket

CEH Core

basket.subtotalIncludingTax (Price)

The basket subtotal, including tax, but before the application of discounts, promotions, shipping costs, etc

CEH Core

CEH Recs

basket.subtotalIncludingTax.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CEH Core

CEH Recs

basket.subtotalIncludingTax.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CEH Core

CEH Recs

product.productId (String)

Id to identify a product, normally covering all of its size, color, pattern, and material variants

CMH Core

CMH Qubit Recs

CMH Google Recs

CMH Badging

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.sku (String)

Unique product identifier to distinguish each product from all of the other size, color, pattern, material, age, group, gender variants

CMH Qubit Recs

CMH Google Recs

CMH Badging

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.name (String)

The product’s name, which should match the name shown on the product page

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.description (String)

An accurate description of the product, which should match the description on the product page

CMH Google Recs

CEH Core

CEH Recs

CEH Abandonment recovery

product.categories (String[])

A list of one or more product categories this product belongs to. Each category is a full path of a category where each level is separated by >

CMH Core

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.price (Price)

The price that the product is currently being sold at, after discounts

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.price.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.price.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.originalPrice (Price)

The price of the product before discounts, promotions

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.originalPrice.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.originalPrice.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.url (String)

The fully qualified URL that the product is shown on

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.images (String[])

An array of fully qualified image URLs for the product. The main image you want to use to display the product must be the first element in the array

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

product.stock (Number)

The number of items left in stock for the product. Should only be populated when the product is in stock and the exact number is known. Should be 0 if the product is out of stock. Where different product variants have different stock levels, use the maximum stock level

CMH Google Recs

CMH Product Insights

CEH Core

CEH Recs

product.manufacturer (String)

The product manufacturer, recommended when a product inventory includes multiple brands

CMH Core

CMH Product Insights

CEH Core

CEH Recs

product.color (String)

The color of the product

CEH Core

CEH Recs

product.size (String)

The size of the product (for example, 12, M, XL, 14)

CEH Core

CEH Recs

quantity (Number)

The number of products described by the line item

CMH Google Recs

CMH Product Insights

CEH Core

CEH Recs

subtotal (Price)

The subtotal of the products described by the line item taking into account the current price and quantity before the application of taxes, discounts, promotions, shipping costs, etc.

CEH Core

CEH Recs

subtotal.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CEH Core

CEH Recs

subtotal.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CEH Core

CEH Recs

subtotalIncludingTax (Price)

The subtotal of the products described by the line item taking into account the current price and quantity including tax, but before the application of discounts, promotions, shipping costs, etc.

CEH Core

subtotalIncludingTax.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CEH Core

subtotalIncludingTax.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CEH Core

transaction.id (String)

An Id unique to the transaction

CMH Core

CMH Qubit Recs

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.discount (Price)

The amount discounted by vouchers or promotions

Optional

basket.discount.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.discount.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.tax (Price)

The total tax applied to the basket

Optional

basket.tax.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.tax.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.shippingPrice (Price)

The selected or default shipping price

Optional

basket.shippingPrice.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.shippingPrice.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.shippingMethod (String)

The selected or default shipping method

Optional

product.groupId (String)

Id for a group of products that come in different versions (variants)

Optional

product.rating (Number)

Average rating for this product. Should be between 0 and 1

Optional

product.reviewCount (Number)

Number of reviews submitted for the product

Optional

product.gender (String)

The target gender of the product

Optional

product.clearance (Boolean)

True if the product is a clearance item

Optional

product.onSale (Boolean)

True if the item is on sale

Optional

shippingMethod (String)

The shipping method for the product. Should only be populated if the product uses a different shipping method to other products in the basket

Optional

shippingCost (Price)

The shipping cost for the product. Should only be populated if the product has an independant shipping cost from other products in the basket

Optional

shippingCost.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

shippingCost.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

discount (Price)

The discount applied to the basket from vouchers or promotions

Optional

discount.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

discount.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

transaction.firstTransaction (Boolean)

True only if this is the first ever transaction for the user

Optional

transaction.paymentType (String)

The type of payment

Optional

transaction.billingAddress.addressee (String)

Full name of the person for whom the address is for

Optional

transaction.billingAddress.company (String)

The name of the company

Optional

transaction.billingAddress.lines (String[])

An array of address lines NOT including city, region, postcode or country (maximum of 3 lines allowed)

Optional

transaction.billingAddress.locality (String)

The town or city

Optional

transaction.billingAddress.region (String)

E.g state in the US, county in the UK

Optional

transaction.billingAddress.postalCode (String)

Can be the country equivalent code (for example, zip code for the U.S)

Optional

transaction.billingAddress.country (String)

The name of the country

Optional

transaction.billingAddress.countryCode (String)

An ISO 3166-1 alpha-2 country code

Optional

transaction.parentId (String)

If the transaction is an amendment to a previous transaction, should be the Id of the parent transaction

Optional

transaction.deliveryAddress.addressee (String)

Full name of the person for whom the address is for

Optional

transaction.deliveryAddress.company (String)

The name of the company

Optional

transaction.deliveryAddress.lines (String[])

An array of address lines NOT including city, region, postcode or country (maximum of 3 lines allowed)

Optional

transaction.deliveryAddress.locality (String)

The town or city

Optional

transaction.deliveryAddress.region (String)

E.g state in the US, county in the UK

Optional

transaction.deliveryAddress.postalCode (String)

Can be the country equivalent code (for example, zip code for the U.S)

Optional

transaction.deliveryAddress.country (String)

The name of the country

Optional

transaction.deliveryAddress.countryCode (String)

An ISO 3166-1 alpha-2 country code

Optional

transaction.collectionStore.id (String)

Unique identifier for the store closest to the user or an explicitly selected store

Optional

transaction.collectionStore.address.addressee (String)

Full name of the person for whom the address is for

Optional

transaction.collectionStore.address.company (String)

The name of the company

Optional

transaction.collectionStore.address.lines (String[])

An array of address lines NOT including city, region, postcode or country (maximum of 3 lines allowed)

Optional

transaction.collectionStore.address.locality (String)

The town or city

Optional

transaction.collectionStore.address.region (String)

E.g state in the US, county in the UK

Optional

transaction.collectionStore.address.postalCode (String)

Can be the country equivalent code (for example, zip code for the U.S)

Optional

transaction.collectionStore.address.country (String)

The name of the country

Optional

transaction.collectionStore.address.countryCode (String)

An ISO 3166-1 alpha-2 country code

Optional

Example JavaScript

uv.emit('ecBasketItemTransaction', {
  basket: {
    id: 'BASK123',
    subtotal: {
      value: 9.99,
      currency: 'USD'
    },
    total: {
      value: 9.99,
      currency: 'USD'
    },
    quantity: 10,
    discount: {
      value: 9.99,
      currency: 'USD'
    },
    tax: {
      value: 9.99,
      currency: 'USD'
    },
    shippingPrice: {
      value: 9.99,
      currency: 'USD'
    },
    shippingMethod: 'Next Day',
    subtotalIncludingTax: {
      value: 9.99,
      currency: 'USD'
    }
  },
  product: {
    groupId: 'DRESS1',
    productId: 'DRESS101',
    sku: 'DRESS101-12',
    name: 'Red Cocktail Dress',
    description: 'This red cocktail dress is perfect for any occasion',
    categories: [
      'Clothing > Sweaters > Short Sleeve Sweaters',
      'New Arrivals > Clothing'
    ],
    price: {
      value: 9.99,
      currency: 'USD'
    },
    originalPrice: {
      value: 9.99,
      currency: 'USD'
    },
    url: 'http://www.fashionunion.com/dresses/red-cocktail-dress.html',
    images: [
      'http://www.fashionunion.com/dresses/red-cocktail-dress-1.jpg',
      'http://www.fashionunion.com/dresses/red-cocktail-dress-2.jpg'
    ],
    stock: 20,
    manufacturer: 'Dress Inc',
    color: 'Red',
    size: '12',
    rating: 0.8,
    reviewCount: 5132,
    gender: 'unisex',
    clearance: true,
    onSale: null
  },
  quantity: 2,
  subtotal: {
    value: 9.99,
    currency: 'USD'
  },
  shippingMethod: 'Express',
  shippingCost: {
    value: 9.99,
    currency: 'USD'
  },
  discount: {
    value: 9.99,
    currency: 'USD'
  },
  subtotalIncludingTax: {
    value: 9.99,
    currency: 'USD'
  },
  transaction: {
    id: '83748372',
    firstTransaction: true,
    paymentType: 'paypal',
    billingAddress: {
      addressee: 'John Smith',
      company: 'Amce Inc',
      lines: [
        'Flat 12',
        '123 High Street'
      ],
      locality: 'London',
      region: 'New York',
      postalCode: '10010',
      country: 'United States',
      countryCode: 'US'
    },
    parentId: '83748371',
    deliveryAddress: {
      addressee: 'John Smith',
      company: 'Amce Inc',
      lines: [
        'Flat 12',
        '123 High Street'
      ],
      locality: 'London',
      region: 'New York',
      postalCode: '10010',
      country: 'United States',
      countryCode: 'US'
    },
    collectionStore: {
      id: '12424',
      address: {
        addressee: 'John Smith',
        company: 'Amce Inc',
        lines: [
          'Flat 12',
          '123 High Street'
        ],
        locality: 'London',
        region: 'New York',
        postalCode: '10010',
        country: 'United States',
        countryCode: 'US'
      }
    }
  }
})

ecBasketTransactionSummary

CMH Core CMH Google Recs CEH Core CEH Social proof CEH Recs CEH Abandonment recovery

This event collects a summary of information about the transaction. Importantly, this event is used to count conversions and the associated revenue. The event must include a transaction.id and the basket total.

Example schema

Field (JS Data Type) Description Required for

basket.id (String)

Unique basket Id

CEH Core

basket.subtotal (Price)

The basket value before the application of taxes, discounts, promotions, shipping costs, etc

CEH Core

CEH Recs

basket.subtotal.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CEH Core

CEH Recs

basket.subtotal.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CEH Core

CEH Recs

basket.total (Price)

The basket total after the application of discounts, promotions, shipping costs, etc

CMH Core

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.total.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Core

CMH Google Recs

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.total.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Core

CMH Google Recs

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.quantity (Number)

The number of items in the basket

CEH Core

basket.subtotalIncludingTax (Price)

The basket subtotal, including tax, but before the application of discounts, promotions, shipping costs, etc

CEH Core

CEH Recs

basket.subtotalIncludingTax.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CEH Core

CEH Recs

basket.subtotalIncludingTax.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CEH Core

CEH Recs

transaction.id (String)

An Id unique to the transaction

CMH Core

CMH Qubit Recs

CMH Google Recs

CMH Product Insights

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.discount (Price)

The amount discounted by vouchers or promotions

Optional

basket.discount.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.discount.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.tax (Price)

The total tax applied to the basket

Optional

basket.tax.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.tax.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.shippingPrice (Price)

The selected or default shipping price

Optional

basket.shippingPrice.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.shippingPrice.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.shippingMethod (String)

The selected or default shipping method

Optional

transaction.firstTransaction (Boolean)

True only if this is the first ever transaction for the user

Optional

transaction.paymentType (String)

The type of payment

Optional

transaction.billingAddress.addressee (String)

Full name of the person for whom the address is for

Optional

transaction.billingAddress.company (String)

The name of the company

Optional

transaction.billingAddress.lines (String[])

An array of address lines NOT including city, region, postcode or country (maximum of 3 lines allowed)

Optional

transaction.billingAddress.locality (String)

The town or city

Optional

transaction.billingAddress.region (String)

E.g state in the US, county in the UK

Optional

transaction.billingAddress.postalCode (String)

Can be the country equivalent code (for example, zip code for the U.S)

Optional

transaction.billingAddress.country (String)

The name of the country

Optional

transaction.billingAddress.countryCode (String)

An ISO 3166-1 alpha-2 country code

Optional

transaction.parentId (String)

If the transaction is an amendment to a previous transaction, should be the Id of the parent transaction

Optional

transaction.deliveryAddress.addressee (String)

Full name of the person for whom the address is for

Optional

transaction.deliveryAddress.company (String)

The name of the company

Optional

transaction.deliveryAddress.lines (String[])

An array of address lines NOT including city, region, postcode or country (maximum of 3 lines allowed)

Optional

transaction.deliveryAddress.locality (String)

The town or city

Optional

transaction.deliveryAddress.region (String)

E.g state in the US, county in the UK

Optional

transaction.deliveryAddress.postalCode (String)

Can be the country equivalent code (for example, zip code for the U.S)

Optional

transaction.deliveryAddress.country (String)

The name of the country

Optional

transaction.deliveryAddress.countryCode (String)

An ISO 3166-1 alpha-2 country code

Optional

transaction.collectionStore.id (String)

Unique identifier for the store closest to the user or an explicitly selected store

Optional

transaction.collectionStore.address.addressee (String)

Full name of the person for whom the address is for

Optional

transaction.collectionStore.address.company (String)

The name of the company

Optional

transaction.collectionStore.address.lines (String[])

An array of address lines NOT including city, region, postcode or country (maximum of 3 lines allowed)

Optional

transaction.collectionStore.address.locality (String)

The town or city

Optional

transaction.collectionStore.address.region (String)

E.g state in the US, county in the UK

Optional

transaction.collectionStore.address.postalCode (String)

Can be the country equivalent code (for example, zip code for the U.S)

Optional

transaction.collectionStore.address.country (String)

The name of the country

Optional

transaction.collectionStore.address.countryCode (String)

An ISO 3166-1 alpha-2 country code

Optional

Example JavaScript

uv.emit('ecBasketTransactionSummary', {
  basket: {
    id: 'BASK123',
    subtotal: {
      value: 9.99,
      currency: 'USD'
    },
    total: {
      value: 9.99,
      currency: 'USD'
    },
    quantity: 10,
    discount: {
      value: 9.99,
      currency: 'USD'
    },
    tax: {
      value: 9.99,
      currency: 'USD'
    },
    shippingPrice: {
      value: 9.99,
      currency: 'USD'
    },
    shippingMethod: 'Next Day',
    subtotalIncludingTax: {
      value: 9.99,
      currency: 'USD'
    }
  },
  transaction: {
    id: '83748372',
    firstTransaction: true,
    paymentType: 'paypal',
    billingAddress: {
      addressee: 'John Smith',
      company: 'Amce Inc',
      lines: [
        'Flat 12',
        '123 High Street'
      ],
      locality: 'London',
      region: 'New York',
      postalCode: '10010',
      country: 'United States',
      countryCode: 'US'
    },
    parentId: '83748371',
    deliveryAddress: {
      addressee: 'John Smith',
      company: 'Amce Inc',
      lines: [
        'Flat 12',
        '123 High Street'
      ],
      locality: 'London',
      region: 'New York',
      postalCode: '10010',
      country: 'United States',
      countryCode: 'US'
    },
    collectionStore: {
      id: '12424',
      address: {
        addressee: 'John Smith',
        company: 'Amce Inc',
        lines: [
          'Flat 12',
          '123 High Street'
        ],
        locality: 'London',
        region: 'New York',
        postalCode: '10010',
        country: 'United States',
        countryCode: 'US'
      }
    }
  }
})

ecBasketSummary

CEH Core

Emitted each time the basket is shown to the visitor either as an inline minibasket or in a view that shows only the basket. If the visitor’s basket is changed in any way, the summary is emitted again.

After emitting one or more ecBasketItem events, a ecBasketSummary event should be emitted. If item level detail is not known, it is acceptable to emit just an ecBasketSummary event.

Example schema

Field (JS Data Type) Description Required for

basket.id (String)

Unique basket Id

CEH Core

basket.subtotal (Price)

The basket value before the application of taxes, discounts, promotions, shipping costs, etc

CEH Core

CEH Recs

basket.subtotal.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Google Recs

CEH Core

CEH Recs

basket.subtotal.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Google Recs

CEH Core

CEH Recs

basket.total (Price)

The basket total after the application of discounts, promotions, shipping costs, etc

CMH Core

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.total.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CMH Core

CMH Google Recs

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.total.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CMH Core

CMH Google Recs

CEH Core

CEH Social proof

CEH Recs

CEH Abandonment recovery

basket.quantity (Number)

The number of items in the basket

CEH Core

basket.subtotalIncludingTax (Price)

The basket subtotal, including tax, but before the application of discounts, promotions, shipping costs, etc

CEH Core

CEH Recs

basket.subtotalIncludingTax.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

CEH Core

CEH Recs

basket.subtotalIncludingTax.currency (String)

The ISO 4217 currency (for example, GBP, USD)

CEH Core

CEH Recs

basket.discount (Price)

The amount discounted by vouchers or promotions

Optional

basket.discount.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.discount.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.tax (Price)

The total tax applied to the basket

Optional

basket.tax.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.tax.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.shippingPrice (Price)

The selected or default shipping price

Optional

basket.shippingPrice.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.shippingPrice.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.shippingMethod (String)

The selected or default shipping method

Optional

Example JavaScript

uv.emit('ecBasketSummary', {
  basket: {
    id: 'BASK123',
    subtotal: {
      value: 9.99,
      currency: 'USD'
    },
    total: {
      value: 9.99,
      currency: 'USD'
    },
    quantity: 10,
    discount: {
      value: 9.99,
      currency: 'USD'
    },
    tax: {
      value: 9.99,
      currency: 'USD'
    },
    shippingPrice: {
      value: 9.99,
      currency: 'USD'
    },
    shippingMethod: 'Next Day',
    subtotalIncludingTax: {
      value: 9.99,
      currency: 'USD'
    }
  }
})

ecUserLogin

Optional

Emitted when a user logs in.

Example schema

Field (JS Data Type) Description Required for

user.id (String)

A unique user Id. Can also be a hash of the username and/or email address

Optional

user.title (String)

The user’s title

Optional

user.firstName (String)

The user’s first name

Optional

user.lastName (String)

The user’s last name

Optional

user.gender (String)

The user’s gender. Can be male, female, or other

Optional

user.username (String)

The username for the user

Optional

user.email (String)

The user’s primary email address

Optional

user.firstSession (Boolean)

True if it’s the user’s first session

Optional

user.hasTransacted (Boolean)

True if the user has completed 1 or more transactions

Optional

user.loyalty.id (String)

Loyalty program membership number

Optional

user.loyalty.tier (String)

The level of the loyalty program this user holds

Optional

user.loyalty.tierPoints (Number)

The number of tier points

Optional

user.loyalty.membershipType (String)

The type of loyalty membership

Optional

user.loyalty.membershipPoints (Number)

The number of points from this membership

Optional

user.address.addressee (String)

Full name of the person for whom the address is for

Optional

user.address.company (String)

The name of the company

Optional

user.address.lines (String[])

An array of address lines NOT including city, region, postcode or country (maximum of 3 lines allowed)

Optional

user.address.locality (String)

The town or city

Optional

user.address.region (String)

E.g state in the US, county in the UK

Optional

user.address.postalCode (String)

Can be the country equivalent code (for example, zip code for the U.S)

Optional

user.address.country (String)

The name of the country

Optional

user.address.countryCode (String)

An ISO 3166-1 alpha-2 country code

Optional

user.isGuest (String)

True if the user is a guest user without a registered account

Optional

user.age (Number)

The user’s age in years

Optional

user.phoneNumber (String)

The user’s phone number. Should be formatted without spaces, braces, or hyphens

Optional

user.countryCallingCode (String)

The country calling code for the given phone number, formatted to include the + prefix, as per ITU-T standard E.123

Optional

user.device (String)

Device the user is browsing on, for example kiosk.

Optional

firstLogin (Boolean)

True only if this is the first time the user has logged in

Optional

Example JavaScript

uv.emit('ecUserLogin', {
  user: {
    id: '2861102bace6e6620948564f0ce0a7cd',
    title: 'Mr',
    firstName: 'John',
    lastName: 'Smith',
    gender: 'Male',
    username: 'JohnSmith',
    email: 'john@johnsmith.com',
    firstSession: null,
    hasTransacted: true,
    loyalty: {
      id: '8989752-223',
      tier: 'silver',
      tierPoints: null,
      membershipType: 'Clearsky Rewards',
      membershipPoints: null
    },
    address: {
      addressee: 'John Smith',
      company: 'Amce Inc',
      lines: [
        'Flat 12',
        '123 High Street'
      ],
      locality: 'London',
      region: 'New York',
      postalCode: '10010',
      country: 'United States',
      countryCode: 'US'
    },
    isGuest: 'true',
    age: 42,
    phoneNumber: '2121234567',
    countryCallingCode: '1',
    device: 'kiosk'
  },
  firstLogin: true
})

ecUserSignup

Optional

Emitted when a user signs up for a newsletter, event, loyalty account, or similar.

Example schema

Field (JS Data Type) Description Required for

user.id (String)

A unique user Id. Can also be a hash of the username and/or email address

Optional

user.title (String)

The user’s title

Optional

user.firstName (String)

The user’s first name

Optional

user.lastName (String)

The user’s last name

Optional

user.gender (String)

The user’s gender. Can be male, female, or other

Optional

user.username (String)

The username for the user

Optional

user.email (String)

The user’s primary email address

Optional

user.firstSession (Boolean)

True if it’s the user’s first session

Optional

user.hasTransacted (Boolean)

True if the user has completed 1 or more transactions

Optional

user.loyalty.id (String)

Loyalty program membership number

Optional

user.loyalty.tier (String)

The level of the loyalty program this user holds

Optional

user.loyalty.tierPoints (Number)

The number of tier points

Optional

user.loyalty.membershipType (String)

The type of loyalty membership

Optional

user.loyalty.membershipPoints (Number)

The number of points from this membership

Optional

user.address.addressee (String)

Full name of the person for whom the address is for

Optional

user.address.company (String)

The name of the company

Optional

user.address.lines (String[])

An array of address lines NOT including city, region, postcode or country (maximum of 3 lines allowed)

Optional

user.address.locality (String)

The town or city

Optional

user.address.region (String)

E.g state in the US, county in the UK

Optional

user.address.postalCode (String)

Can be the country equivalent code (for example, zip code for the U.S)

Optional

user.address.country (String)

The name of the country

Optional

user.address.countryCode (String)

An ISO 3166-1 alpha-2 country code

Optional

user.isGuest (String)

True if the user is a guest user without a registered account

Optional

user.age (Number)

The user’s age in years

Optional

user.phoneNumber (String)

The user’s phone number. Should be formatted without spaces, braces, or hyphens

Optional

user.countryCallingCode (String)

The country calling code for the given phone number, formatted to include the + prefix, as per ITU-T standard E.123

Optional

user.device (String)

Device the user is browsing on, for example kiosk.

Optional

type (String)

What the user has signed up for

Optional

name (String)

A meaningful name unique to the sign up

Optional

Example JavaScript

uv.emit('ecUserSignup', {
  user: {
    id: '2861102bace6e6620948564f0ce0a7cd',
    title: 'Mr',
    firstName: 'John',
    lastName: 'Smith',
    gender: 'Male',
    username: 'JohnSmith',
    email: 'john@johnsmith.com',
    firstSession: null,
    hasTransacted: true,
    loyalty: {
      id: '8989752-223',
      tier: 'silver',
      tierPoints: null,
      membershipType: 'Clearsky Rewards',
      membershipPoints: null
    },
    address: {
      addressee: 'John Smith',
      company: 'Amce Inc',
      lines: [
        'Flat 12',
        '123 High Street'
      ],
      locality: 'London',
      region: 'New York',
      postalCode: '10010',
      country: 'United States',
      countryCode: 'US'
    },
    isGuest: 'true',
    age: 42,
    phoneNumber: '2121234567',
    countryCallingCode: '1',
    device: 'kiosk'
  },
  type: 'newsletter',
  name: 'loyaltyaccount'
})

ecInteraction

Optional

Emitted to track visitor interaction for certain elements on the page. These events are not emitted for all interactions on all elements, only those that are of interest.

Example schema

Field (JS Data Type) Description Required for

type (String)

The interaction type (for example, click, view, hover, download, share)

Optional

name (String)

A meaningful name unique for the event

Optional

Example JavaScript

uv.emit('ecInteraction', {
  type: 'click',
  name: 'TopNavHomeButton'
})

ecError

Optional

Emitted for every error.

Example schema

Field (JS Data Type) Description Required for

code (String)

The error code.

Optional

message (String)

The error message.

Optional

Example JavaScript

uv.emit('ecError', {
  code: null,
  message: null
})

ecFilterCriteria

Optional

Emitted on listing and search result views to report the filters applied and the sorting.

On search views, the event is emitted with the name: 'search', operator: 'equal', and value: '[entered search term]':

name: 'search',
operator: 'equal',
value: 'shoes'

On category views, for each category the view falls under, the event is emitted with the name :'category', operator: 'equal', and value: '[category name]':

name: 'adidas',
operator: 'equal',
value: 'trainers'

Ranges are modeled by emitting the upper and lower bound as separate filter criteria events, setting the operator as greater than or less than.

When users add, remove, or change a filter, a new view event is emitted followed by all filter criteria that are still active after the change.

Example schema

Field (JS Data Type) Description Required for

summary.pagination (Number)

The number of items shown per page to the visitor.

Optional

summary.resultCount (Number)

The number of items that match the current query and/or filters. Should be more than or equal to the number of items shown to the visitor.

Optional

summary.layout (String)

The user’s chosen visual layout of the listing (for example, list, grid or map)

Optional

summary.sortBy (String)

The sort column.

Optional

summary.sortDirection (String)

The sort direction, that is, ascending or descending.

Optional

name (String)

The name of criteria (for example, shoe size, price, brands, airlines). Should be category on category pages.

Optional

operator (String)

Can be equal, not equal, greater than or less than.

Optional

value.boolean (Boolean)

Should only be populated if the type is 'Boolean'.

Optional

value.integer (String)

Should only be populated if the type is 'Integer'.

Optional

value.long (Long)

Should only be populated if the type is 'Long'.

Optional

value.float (Number)

Should only be populated if the type is 'Float'.

Optional

value.timestamp (Epochtimems)

Should only be populated if the type is 'EpochTimeMs'.

Optional

value.money (Number)

Should only be populated if the type is 'Money'.

Optional

value.currency (String)

Should only be populated if the type is 'Currency'.

Optional

value.email (String)

Should only be populated if the type is 'Email'.

Optional

value.url (String)

Should only be populated if the type is 'URL'.

Optional

value.string (String)

Should only be populated if the type is 'String'.

Optional

value.text (String)

Should only be populated if the type is 'Text'.

Optional

value.date (Date)

Should only be populated if the type is 'Date'.

Optional

value.json (Json)

Should only be populated if the type is 'JSON'.

Optional

Example JavaScript

uv.emit('ecFilterCriteria', {
  summary: {
    pagination: 1,
    resultCount: 20,
    layout: 'list',
    sortBy: 'price',
    sortDirection: 'descending'
  },
  name: 'price',
  operator: 'less than',
  value: {
    'boolean': true,
    integer: '10',
    'long': 1238902625,
    'float': 5.5,
    timestamp: 1455748626070,
    money: 9.99,
    currency: 'USD',
    email: 'john.smith@gmail.com',
    url: 'http://demo.qubitproducts.com',
    string: 'This is some text',
    text: 'This is some longer text',
    date: '2016-05-20T17:33:45+00:00',
    json: '{"key":"value","anotherKey":123,"yetAnotherKey":{"subKey":true}}'
  }
})

ecFormSubmission

Optional

Emitted when a user submits a form

Example schema

Field (JS Data Type) Description Required for

submissionId (String)

An Id unique to the form submission

Optional

name (String)

The name of the form

Optional

Example JavaScript

uv.emit('ecFormSubmission', {
  submissionId: null,
  name: 'ContactUsEnquiry'
})

ecProductRecommendation

Optional

Emitted for every product that is recommended to a visitor, in most cases as a related item to a recently viewed product.

Example schema

Field (JS Data Type) Description Required for

product.groupId (String)

Id for a group of products that come in different versions (variants)

Optional

product.productId (String)

Id to identify a product, normally covering all of its size, color, pattern, and material variants

Optional

product.sku (String)

Unique product identifier to distinguish each product from all of the other size, color, pattern, material, age, group, gender variants

Optional

product.name (String)

The product’s name, which should match the name shown on the product page

Optional

product.description (String)

An accurate description of the product, which should match the description on the product page

Optional

product.categories (String[])

A list of one or more product categories this product belongs to. Each category is a full path of a category where each level is separated by >

Optional

product.price (Price)

The price that the product is currently being sold at, after discounts

Optional

product.price.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

product.price.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

product.originalPrice (Price)

The price of the product before discounts, promotions

Optional

product.originalPrice.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

product.originalPrice.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

product.url (String)

The fully qualified URL that the product is shown on

Optional

product.images (String[])

An array of fully qualified image URLs for the product. The main image you want to use to display the product must be the first element in the array

Optional

product.stock (Number)

The number of items left in stock for the product. Should only be populated when the product is in stock and the exact number is known. Should be 0 if the product is out of stock. Where different product variants have different stock levels, use the maximum stock level

Optional

product.manufacturer (String)

The product manufacturer, recommended when a product inventory includes multiple brands

Optional

product.color (String)

The color of the product

Optional

product.size (String)

The size of the product (for example, 12, M, XL, 14)

Optional

product.rating (Number)

Average rating for this product. Should be between 0 and 1

Optional

product.reviewCount (Number)

Number of reviews submitted for the product

Optional

product.gender (String)

The target gender of the product

Optional

product.clearance (Boolean)

True if the product is a clearance item

Optional

product.onSale (Boolean)

True if the item is on sale

Optional

eventType (String)

The type of product event (for example, 'listing', 'detail', or 'linked_product')

Optional

index (Number)

The index of the product as it’s positioned on the page (for example, the first product in a listing would be 0, the next would be 1).

Optional

rank (Number)

A rank between 0 and 1 (0 being the first shown / highest ranking recommendation).

Optional

Example JavaScript

uv.emit('ecProductRecommendation', {
  product: {
    groupId: 'DRESS1',
    productId: 'DRESS101',
    sku: 'DRESS101-12',
    name: 'Red Cocktail Dress',
    description: 'This red cocktail dress is perfect for any occasion',
    categories: [
      'Clothing > Sweaters > Short Sleeve Sweaters',
      'New Arrivals > Clothing'
    ],
    price: {
      value: 9.99,
      currency: 'USD'
    },
    originalPrice: {
      value: 9.99,
      currency: 'USD'
    },
    url: 'http://www.fashionunion.com/dresses/red-cocktail-dress.html',
    images: [
      'http://www.fashionunion.com/dresses/red-cocktail-dress-1.jpg',
      'http://www.fashionunion.com/dresses/red-cocktail-dress-2.jpg'
    ],
    stock: 20,
    manufacturer: 'Dress Inc',
    color: 'Red',
    size: '12',
    rating: 0.8,
    reviewCount: 5132,
    gender: 'unisex',
    clearance: true,
    onSale: null
  },
  eventType: 'detail',
  index: 1,
  rank: 0.8
})

ecProductStateDev

Optional

Example schema

Field (JS Data Type) Description Required for

meta.type (String)

The type of event.

Optional

meta.referrerUrl (String)

The referrer URL.

Optional

context.id (String)

The product ID.

Optional

product.groupId (String)

Id for a group of products that come in different versions (variants)

Optional

product.productId (String)

Id to identify a product, normally covering all of its size, color, pattern, and material variants

Optional

product.sku (String)

Unique product identifier to distinguish each product from all of the other size, color, pattern, material, age, group, gender variants

Optional

product.name (String)

The product’s name, which should match the name shown on the product page

Optional

product.description (String)

An accurate description of the product, which should match the description on the product page

Optional

product.categories (String[])

A list of one or more product categories this product belongs to. Each category is a full path of a category where each level is separated by >

Optional

product.price (Price)

The price that the product is currently being sold at, after discounts

Optional

product.price.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

product.price.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

product.originalPrice (Price)

The price of the product before discounts, promotions

Optional

product.originalPrice.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

product.originalPrice.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

product.url (String)

The fully qualified URL that the product is shown on

Optional

product.images (String[])

An array of fully qualified image URLs for the product. The main image you want to use to display the product must be the first element in the array

Optional

product.stock (Number)

The number of items left in stock for the product. Should only be populated when the product is in stock and the exact number is known. Should be 0 if the product is out of stock. Where different product variants have different stock levels, use the maximum stock level

Optional

product.manufacturer (String)

The product manufacturer, recommended when a product inventory includes multiple brands

Optional

product.color (String)

The color of the product

Optional

product.size (String)

The size of the product (for example, 12, M, XL, 14)

Optional

product.rating (Number)

Average rating for this product. Should be between 0 and 1

Optional

product.reviewCount (Number)

Number of reviews submitted for the product

Optional

product.gender (String)

The target gender of the product

Optional

product.clearance (Boolean)

True if the product is a clearance item

Optional

product.onSale (Boolean)

True if the item is on sale

Optional

Example JavaScript

uv.emit('ecProductStateDev', {
  meta: {
    type: 'ecView',
    referrerUrl: 'https://www.google.co.uk/'
  },
  context: {
    id: '1334'
  },
  product: {
    groupId: 'DRESS1',
    productId: 'DRESS101',
    sku: 'DRESS101-12',
    name: 'Red Cocktail Dress',
    description: 'This red cocktail dress is perfect for any occasion',
    categories: [
      'Clothing > Sweaters > Short Sleeve Sweaters',
      'New Arrivals > Clothing'
    ],
    price: {
      value: 9.99,
      currency: 'USD'
    },
    originalPrice: {
      value: 9.99,
      currency: 'USD'
    },
    url: 'http://www.fashionunion.com/dresses/red-cocktail-dress.html',
    images: [
      'http://www.fashionunion.com/dresses/red-cocktail-dress-1.jpg',
      'http://www.fashionunion.com/dresses/red-cocktail-dress-2.jpg'
    ],
    stock: 20,
    manufacturer: 'Dress Inc',
    color: 'Red',
    size: '12',
    rating: 0.8,
    reviewCount: 5132,
    gender: 'unisex',
    clearance: true,
    onSale: null
  }
})

ecSearch

Optional

Emitted when a visitor lands on a search results page or is redirected to another page on site.

Example schema

Field (JS Data Type) Description Required for

type (String)

The type of search conducted by the visitor. Values can be 'organic', 'autocomplete' or 'suggestion'.

Optional

outcome (String)

The result of the search conducted by the visitor. Values can be 'success', 'fail' or 'redirect'.

Optional

query.id (String)

Unique identifier for the visitor’s search.

Optional

query.term (String)

Search term entered by the visitor.

Optional

resultCount (Number)

The total number of products returned on the search results page.

Optional

source (String)

Where the search originated from.

Optional

Example JavaScript

uv.emit('ecSearch', {
  type: 'organic',
  outcome: 'success',
  query: {
    id: '0k0om4iccpo-0ksgltzxn-afw61j5',
    term: 'Dress'
  },
  resultCount: 20,
  source: 'spotlight-search'
})

ecSearchItemClick

Optional

Emitted when a visitor clicks a product from the search results page.

Example schema

Field (JS Data Type) Description Required for

query.id (String)

Unique identifier for the visitor’s search.

Optional

query.term (String)

Search term entered by the visitor.

Optional

productId (String)

Product ID clicked by the visitor on the search results page.

Optional

position (Number)

Position of the product that was clicked on the search results page.

Optional

Example JavaScript

uv.emit('ecSearchItemClick', {
  query: {
    id: '0k0om4iccpo-0ksgltzxn-afw61j5',
    term: 'Dress'
  },
  productId: 'DRESS101',
  position: 3
})

ecSearchItemsShown

Optional

Emitted when products are shown to the visitor on a search results page.

Example schema

Field (JS Data Type) Description Required for

query.id (String)

Unique identifier for the visitor’s search.

Optional

query.term (String)

Search term entered by the visitor.

Optional

productIds (String[])

Array of product IDs shown to the visitor on the search results page.

Optional

Example JavaScript

uv.emit('ecSearchItemsShown', {
  query: {
    id: '0k0om4iccpo-0ksgltzxn-afw61j5',
    term: 'Dress'
  },
  productIds: [
    'DRESS101',
    'DRESS102',
    'DRESS103'
  ]
})

ecStoreLocator

Optional

Emitted when a user runs a query on the store locater.

Note

store is not emitted if the query doesn’t return any results.

Example schema

Field (JS Data Type) Description Required for

type (String)

Type of query the user enters, if the user can query from different fields (for example, postcode, street address, city).

Optional

query (String)

User-entered store location query.

Optional

store.id (String)

Unique identifier for the store closest to the user or an explicitly selected store

Optional

store.address.addressee (String)

Full name of the person for whom the address is for

Optional

store.address.company (String)

The name of the company

Optional

store.address.lines (String[])

An array of address lines NOT including city, region, postcode or country (maximum of 3 lines allowed)

Optional

store.address.locality (String)

The town or city

Optional

store.address.region (String)

E.g state in the US, county in the UK

Optional

store.address.postalCode (String)

Can be the country equivalent code (for example, zip code for the U.S)

Optional

store.address.country (String)

The name of the country

Optional

store.address.countryCode (String)

An ISO 3166-1 alpha-2 country code

Optional

Example JavaScript

uv.emit('ecStoreLocator', {
  type: 'zipcode',
  query: '10010',
  store: {
    id: '12424',
    address: {
      addressee: 'John Smith',
      company: 'Amce Inc',
      lines: [
        'Flat 12',
        '123 High Street'
      ],
      locality: 'London',
      region: 'New York',
      postalCode: '10010',
      country: 'United States',
      countryCode: 'US'
    }
  }
})

ecVoucher

Optional

Emitted when a voucher code is entered.

Example schema

Field (JS Data Type) Description Required for

entry (String)

Actual voucher code the user enters.

Optional

entrySuccess (Boolean)

Whether or not the voucher is successfully applied to the transaction. An entry must be valid to be successful.

Optional

voucher.id (String)

A unique Id to identify the voucher used, which should be the same for all visitors that are using the voucher/promotion

Optional

voucher.label (String)

A name or label for the voucher/promotion

Optional

transaction.id (String)

An Id unique to the transaction

Optional

transaction.firstTransaction (Boolean)

True only if this is the first ever transaction for the user

Optional

transaction.paymentType (String)

The type of payment

Optional

transaction.billingAddress.addressee (String)

Full name of the person for whom the address is for

Optional

transaction.billingAddress.company (String)

The name of the company

Optional

transaction.billingAddress.lines (String[])

An array of address lines NOT including city, region, postcode or country (maximum of 3 lines allowed)

Optional

transaction.billingAddress.locality (String)

The town or city

Optional

transaction.billingAddress.region (String)

E.g state in the US, county in the UK

Optional

transaction.billingAddress.postalCode (String)

Can be the country equivalent code (for example, zip code for the U.S)

Optional

transaction.billingAddress.country (String)

The name of the country

Optional

transaction.billingAddress.countryCode (String)

An ISO 3166-1 alpha-2 country code

Optional

transaction.parentId (String)

If the transaction is an amendment to a previous transaction, should be the Id of the parent transaction

Optional

transaction.deliveryAddress.addressee (String)

Full name of the person for whom the address is for

Optional

transaction.deliveryAddress.company (String)

The name of the company

Optional

transaction.deliveryAddress.lines (String[])

An array of address lines NOT including city, region, postcode or country (maximum of 3 lines allowed)

Optional

transaction.deliveryAddress.locality (String)

The town or city

Optional

transaction.deliveryAddress.region (String)

E.g state in the US, county in the UK

Optional

transaction.deliveryAddress.postalCode (String)

Can be the country equivalent code (for example, zip code for the U.S)

Optional

transaction.deliveryAddress.country (String)

The name of the country

Optional

transaction.deliveryAddress.countryCode (String)

An ISO 3166-1 alpha-2 country code

Optional

transaction.collectionStore.id (String)

Unique identifier for the store closest to the user or an explicitly selected store

Optional

transaction.collectionStore.address.addressee (String)

Full name of the person for whom the address is for

Optional

transaction.collectionStore.address.company (String)

The name of the company

Optional

transaction.collectionStore.address.lines (String[])

An array of address lines NOT including city, region, postcode or country (maximum of 3 lines allowed)

Optional

transaction.collectionStore.address.locality (String)

The town or city

Optional

transaction.collectionStore.address.region (String)

E.g state in the US, county in the UK

Optional

transaction.collectionStore.address.postalCode (String)

Can be the country equivalent code (for example, zip code for the U.S)

Optional

transaction.collectionStore.address.country (String)

The name of the country

Optional

transaction.collectionStore.address.countryCode (String)

An ISO 3166-1 alpha-2 country code

Optional

basket.id (String)

Unique basket Id

Optional

basket.subtotal (Price)

The basket value before the application of taxes, discounts, promotions, shipping costs, etc

Optional

basket.subtotal.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.subtotal.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.total (Price)

The basket total after the application of discounts, promotions, shipping costs, etc

Optional

basket.total.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.total.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.quantity (Number)

The number of items in the basket

Optional

basket.discount (Price)

The amount discounted by vouchers or promotions

Optional

basket.discount.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.discount.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.tax (Price)

The total tax applied to the basket

Optional

basket.tax.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.tax.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.shippingPrice (Price)

The selected or default shipping price

Optional

basket.shippingPrice.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.shippingPrice.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

basket.shippingMethod (String)

The selected or default shipping method

Optional

basket.subtotalIncludingTax (Price)

The basket subtotal, including tax, but before the application of discounts, promotions, shipping costs, etc

Optional

basket.subtotalIncludingTax.value (Number)

Depending on the context, this could be the value of the basket, product, package, total, subtotal, discount, shipping, item, game, bet, etc. Refer to our setup docs for more specific details for each vertical and event

Optional

basket.subtotalIncludingTax.currency (String)

The ISO 4217 currency (for example, GBP, USD)

Optional

Example JavaScript

uv.emit('ecVoucher', {
  entry: '12321',
  entrySuccess: true,
  voucher: {
    id: 'AO8734',
    label: 'SummerPromo'
  },
  transaction: {
    id: '83748372',
    firstTransaction: true,
    paymentType: 'paypal',
    billingAddress: {
      addressee: 'John Smith',
      company: 'Amce Inc',
      lines: [
        'Flat 12',
        '123 High Street'
      ],
      locality: 'London',
      region: 'New York',
      postalCode: '10010',
      country: 'United States',
      countryCode: 'US'
    },
    parentId: '83748371',
    deliveryAddress: {
      addressee: 'John Smith',
      company: 'Amce Inc',
      lines: [
        'Flat 12',
        '123 High Street'
      ],
      locality: 'London',
      region: 'New York',
      postalCode: '10010',
      country: 'United States',
      countryCode: 'US'
    },
    collectionStore: {
      id: '12424',
      address: {
        addressee: 'John Smith',
        company: 'Amce Inc',
        lines: [
          'Flat 12',
          '123 High Street'
        ],
        locality: 'London',
        region: 'New York',
        postalCode: '10010',
        country: 'United States',
        countryCode: 'US'
      }
    }
  },
  basket: {
    id: 'BASK123',
    subtotal: {
      value: 9.99,
      currency: 'USD'
    },
    total: {
      value: 9.99,
      currency: 'USD'
    },
    quantity: 10,
    discount: {
      value: 9.99,
      currency: 'USD'
    },
    tax: {
      value: 9.99,
      currency: 'USD'
    },
    shippingPrice: {
      value: 9.99,
      currency: 'USD'
    },
    shippingMethod: 'Next Day',
    subtotalIncludingTax: {
      value: 9.99,
      currency: 'USD'
    }
  }
})