Viewed products

 

Foreword

Before starting implementation of the SalesTracker plugin, please make sure you have initialised the AT Internet JavaScript Tracker and selected the plugin from within the Tag Composer interface.

The measurement of viewed products needs an option to be activated. Please contact the support centre for more information.

 

Tagging methods

The  SalesTracker JavaScript makes it possible to measure viewed products.

The Tracker has a method “product.add()”.

Properties marked with a * need the SalesTracker option in order to be processed.

The method “product.add()” takes an object as a parameter whose properties are as follows:

  • * category1 to category6: Product categories (up to 6 levels) with format ‘ID[category_label]’.
  • * productId: Product ID with format ‘ID[product_label]’.

See Appendix for more details about category and product ID format.

The Viewed Product tag allows the sending of hit independent from Page tag.

 

Measuring viewed products

The code below can be used to measure “viewed products”. It must be placed on a page that contains a description of the product. This description must be clear enough so that it can be easily seen that Internet users seem interested in this product. For instance, it would be a good idea to place this code on a product page or on a service page.

In concrete terms, you must enter the “product” object by indicating the product ID (“productId”) and optional levels of categories (up to 6 levels), following the tag example below:

var tag = new ATInternet.Tracker.Tag();
// set page
tag.page.set({
    name:'pageName'
});
// set products
tag.product.add({
    productId: '564[laptop_ACER_A56]',
    category1: '1[Computers_and_Networking]',
    category2: '25[Computers]',
    category3: '56[Laptops]'
});
tag.product.add({
    productId: '405[laptop_ACER_C720P]',
    category1: '1[Computers_and_Networking]',
    category2: '25[Computers]',
    category3: '56[Laptops]',
    category4: '98[Chromebook]'
});
tag.dispatch();
 

Appendix : tagging rules

  • Avoid “space”-type special characters and accented letters.
  • If one of the text fields contains a space, the hit is ignored.
  • Field labels should not contain special characters. If a label already exists for a given ID, the labels encoutered afterwards will not be saved.
  • The product IDs are mandatory.
  • The product category IDs are optional. They are unique, on the contrary to sub-category IDs which can be used several times with a distinct label.If you do not enter a label in the category (ID only), the name that will show up in the interface will be “#ID”.
  • ID and Label size:
    • Product category (‘ID[category_label]’)
      • ID: integer up to 10 digits.
      • category_label: category name up to 150 characters.
    • Product ID (‘ID[product_label]’)
      • ID: alphanumeric reference up to 50 characters.
      • product_label: product name up to 150 characters.
 

Was this post helpful?

Last update: 11/06/2018