Page History

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Push Product details' data when user clicks a product, includes the additional data: orderType (SALE, RESERVATION), datetime for dated product (performance dateTime, timeslot)

Code Block
languagejs
titleProduct click DataLayer Example
collapsetrue
<script>
dataLayer.push({
  'event':'ee-productClick'
  'ecommerce': {
    'click': {
      'actionField': {
      'list': 'Product list name'
      },
      'products': [{
        'id':'ABC123',						// Product ID
        'name':'Product Name',				// Product name
		'date':'15/04/2021 - 15:30'         // Date time of timeslot, performance, match
        'brand':'Product Brand',			// Product Family Type / Topic of the product (if set)
        'position':0						// Position of a product in a given Section (landing page) or Product type (Landing page list view or Normal view)
		'variant':'SALE'					// Product is to be SOLD or RESERVED
        }]
       }
    }
});
</script> 

...

Code Block
languagejs
titlePromotion click DataLayer Example
collapsetrue
<script>
dataLayer.push ({
  'event':'ee-promoClick',
  'ecommerce':{
    'promoClick':{
      'promotions':[{
        'id':'Promo ID',						// Advantage ID
        'name':'Promo name',					// Advantage name
        'creative':'Creative name',				// Advantage description
        'position':Position						// Position of a product in a given Section (landing page) or Product type (Landing page list view or Normal view)
		'variant':'SALE'					// Product is to be SOLD or RESERVED
        }]
      }
    }
});
</script> 

Cart and Check-out

1. Add or Remove products from Cart

Push data when a product is added to cart, or remove from cart

Code Block
languagejs
titleAdd to Cart DataLayer Example
collapsetrue
// Measure adding a product to a shopping cart 
// and a list of product.
dataLayer.push({
  'event': 'addToCart',
  'ecommerce': {
    'currencyCode': 'EUR',         // Currency code used for the PoS
    'add': {                       // 'add' actionFieldObject measures.
      'products': [{                       //  List of product items added to the shopping cart.
        'name': 'Museum Pass',                  // Product Name
        'id': '1234-567-987',                   // Unique SKU of the product item, i.e. product id - item id (if product is non-dated product)  - performance id (if product is of event or parking or visit type) - seat category id - tarrif type id - timeslot id (if product is timeslot) - advantage id (if any) (same as enhanced e-commerce dataLayer)
        'price': '15.25',                       // Unit Price          
        'brand': 'Visit Pass / Exhibition',     // Product Family Type / Topic of the product (if set) (same as enhanced e-commerce dataLayer)
        'category': 'Cat A / Normal',           // Seat category / tarrif type
        'variant': 'Cross-sell 1-click / 1234', // Cross selling type / parent product id (if added to cart via cross-selling)
        'quantity': 1                           // Quantity added to cart for this product item
        'url': 'https://mosa.int1-shop.secutix.com/selection/timeslotpass?productId=101047223156'     // URL pointing to the corresponding product item selection page which can be used by 3rd-party email retargeting tools
        'imgUrl': 'https://mosa.int1-shop.secutix.com/api/1/dl/product/101047223156/logo'             // Image URL of the corresponding product item which can be used by 3rd-party email retargeting tools
       }]
    }
  }
});


Code Block
languagejs
titleRemove from Cart DataLayer Example
collapsetrue
// Measure the removal of a product from a shopping cart.
dataLayer.push({
  'event': 'removeFromCart',
  'ecommerce': {
    'remove': {                               // 'remove' actionFieldObject measures.
      'products': [{                          //  removing a product to a shopping cart.
        'name': 'Museum Pass',                  // Product Name
        'id': '1234-567-987',                   // Unique SKU of the product item, i.e. product id - item id (if product is non-dated product)  - performance id (if product is of event or parking or visit type) - seat category id - tarrif type id - timeslot id (if product is timeslot) - advantage id (if any) (same as enhanced e-commerce dataLayer)
        'price': '15.25',                       // Unit Price          
        'brand': 'Visit Pass / Exhibition',     // Product Family Type / Topic of the product (if set) (same as enhanced e-commerce dataLayer)
        'category': 'Cat A / Normal',           // Seat category / tarrif type
        'variant': 'Cross-sell 1-click / 1234', // Cross selling type / parent product id (if added to cart via cross-selling)
        'quantity': 1                           // Quantity added to cart for this product item
      }]
    }
  }
});