Product Events

 

Foreword

This tagging documentation only applies to Tracker from version 5.20.0.

Before beginning implementation of Sales Insights, please make sure you have read the events’ getting started.
If you can’t see the “Ecommerce” menu entry in Explorer, please get in touch with us so we get this activated for you.

 

Product Events

The plugin provides different useful functions for measuring:

  • display of products
  • display of product pages
  • addition or deletion of products in cart.
 

Product display

The Tracker has one declaration method:

  • tag.ecommerce.displayProduct.products.set()

Measuring a product display is done via declaring a product table.

The product table can include one or several products.

A product is an object that can have the following properties:

  • “id” – String: Product ID (this parameter is mandatory).
  • “variant” – String: Product variant (size, color, etc.).
  • “article” – String: Additional level of detail for product variant.
  • “placement” – String: Product placement.
  • “promocode” – Array: Promotional code table including one or several codes. A promotional code is declared as a label.
  • “$” – String: Product name.
  • “brand” – String: Product brand.
  • “discount” – Boolean: Discounted product.
  • “pricetaxincluded” – Float: Product price, tax incl.
  • “pricetaxfree” – Float: Product price, tax excl.
  • “stock” – Boolean: Product in stock.
  • “category1” – String: Product 's level 1 category (up to 6 tree structure levels possible; from “category1” to “category6”).

Example

var tag = new ATInternet.Tracker.Tag();
tag.ecommerce.displayProduct.products.set([{
    "id": "1",
    "variant": "1",
    "article": "21",
    "placement": "homepage",
    "promocode": ["AQQYRTGJ"],
    "$": "laptop_A56",
    "brand": "ACER",
    "discount": true,
    "pricetaxincluded": 549,
    "pricetaxfree": 456.2,
    "stock": true,
    "category1": "Computers_and_Networking",
    "category2": "Computers",
    "category3": "Laptops"
}]);
tag.dispatch();
 

Product page display

The Tracker has one declaration method:

  • tag.ecommerce.displayPageProduct.products.set()

Measuring a product page display is done via declaring a product table.

The product table can include one or several products.

A product is an object that can have the following properties:

  • “id” – String: Product ID (this parameter is mandatory).
  • “variant” – String: Product variant (size, color, etc.).
  • “article” – String: Additional level of detail for product variant.
  • “placement” – String: Product placement.
  • “promocode” – Array: Promotional code table including one or several codes. A promotional code is declared as a label.
  • “$” – String: Product name.
  • “brand” – String: Product brand.
  • “discount” – Boolean: Discounted product.
  • “pricetaxincluded” – Float: Product price, tax incl.
  • “pricetaxfree” – Float: Product price, tax excl.
  • “stock” – Boolean: Product in stock.
  • “category1” – String: Product 's level 1 category (up to 6 tree structure levels possible; from “category1” to “category6”).

Example

var tag = new ATInternet.Tracker.Tag();
tag.ecommerce.displayPageProduct.products.set([{
    "id": "1",
    "variant": "1",
    "article": "21",
    "placement": "homepage",
    "promocode": ["AQQYRTGJ"],
    "$": "laptop_A56",
    "brand": "ACER",
    "discount": true,
    "pricetaxincluded": 549,
    "pricetaxfree": 456.2,
    "stock": true,
    "category1": "Computers_and_Networking",
    "category2": "Computers",
    "category3": "Laptops"
}]);
tag.dispatch();
 

Product addition

The Tracker has two declaration methods:

  • tag.ecommerce.addProduct.cart.set()
  • tag.ecommerce.addProduct.products.set()

Measuring the addition of a product to a shopping cart is done via declaring a cart object and a product table.

The shopping cart is declared as an object with the following property:

  • “id” – String: Cart ID (mandatory).

A product is declared as an object that can have the following properties:

  • “id” – String: Product ID (this parameter is mandatory).
  • “variant” – String: Product variant (size, color, etc.).
  • “article” – String: Additional level of detail for product variant.
  • “placement” – String: Product placement.
  • “promocode” – Array: Promotional code table including one or several codes. A promotional code is declared as a label.
  • “$” – String: Product name.
  • “brand” – String: Product brand.
  • “discount” – Boolean: Discounted product.
  • “pricetaxincluded” – Float: Product price, tax incl.
  • “pricetaxfree” – Float: Product price, tax excl.
  • “stock” – Boolean: Product in stock.
  • “quantity” – Number: Number of products to add to cart.
  • “category1” – String: Product 's level 1 category (up to 6 tree structure levels possible; from “category1” to “category6”).
  • “cartcreation” – Boolean: Cart creation.

Example

var tag = new ATInternet.Tracker.Tag();
tag.ecommerce.addProduct.cart.set({"id": "34"});
tag.ecommerce.addProduct.products.set([{
    "id": "1",
    "variant": "1",
    "article": "21",
    "placement": "homepage",
    "promocode": ["AQQYRTGJ"],
    "$": "laptop_A56",
    "brand": "ACER",
    "discount": true,
    "pricetaxincluded": 549,
    "pricetaxfree": 456.2,
    "stock": true,
    "quantity": 1,
    "category1": "Computers_and_Networking",
    "category2": "Computers",
    "category3": "Laptops",
    "cartcreation": true
}]);
tag.dispatch();
 

Product removal

The Tracker has two declaration methods:

  • tag.ecommerce.removeProduct.cart.set()
  • tag.ecommerce.removeProduct.products.set()

Measuring a product 's removal from a cart is done via declaring a cart object and a product table.

The cart is declared as an object with the property:

  • “id” – String: Cart ID (this parameter is mandatory).

A product is declared as an object that can have the following properties:

  • “id” – String: Product ID (this parameter is mandatory).
  • “variant” – String: Product variant (size, color, etc.).
  • “article” – String: Additional level of detail for product variant.
  • “placement” – String: Product placement.
  • “promocode” – Array: Promotional code table including one or several codes. A promotional code is declared as a label.
  • “$” – String: Product name.
  • “brand” – String: Product brand.
  • “discount” – Boolean: Discounted product.
  • “pricetaxincluded” – Float: Product price, tax incl.
  • “pricetaxfree” – Float: Product price, tax excl.
  • “stock” – Boolean: Product in stock.
  • “quantity” – Number: Number of products to remove from cart.
  • “category1” – String: Product 's level 1 category (up to 6 tree structure levels possible; from “category1” to “category6”).

Example

var tag = new ATInternet.Tracker.Tag();
tag.ecommerce.removeProduct.cart.set({"id": "34"});
tag.ecommerce.removeProduct.products.set([{
    "id": "1",
    "variant": "1",
    "article": "21",
    "placement": "homepage",
    "promocode": ["AQQYRTGJ"],
    "$": "laptop_A56",
    "brand": "ACER",
    "discount": true,
    "pricetaxincluded": 549,
    "pricetaxfree": 456.2,
    "stock": true,
    "quantity": 1,
    "category1": "Computers_and_Networking",
    "category2": "Computers",
    "category3": "Laptops"
}]);
tag.dispatch();
 

Appendices

 

Tagging methods

  • tag.ecommerce.displayProduct.products.set
  • tag.ecommerce.displayPageProduct.products.set
  • tag.ecommerce.addProduct.cart.set
  • tag.ecommerce.addProduct.products.set
  • tag.ecommerce.removeProduct.cart.set
  • tag.ecommerce.removeProduct.products.set
Last update: 24/09/2020