Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 4 Next »

Data layer Google Analytics 4 Events - Summary

https://developers.google.com/analytics/devguides/migration/ecommerce/ecommerce-gtag - E-commerce (GA4) Developer Guide

https://developers.google.com/analytics/devguides/migration/ecommerce/gtagjs-compatibility - Ecommerce event compatibility and translation reference (gtag.js)


Google Analytics 4 Events - GuidelinesSecuTix Ticket shop events available Description

event: "view_item_list",

view_item_list

a user sees a list of items/offerings

event: "select_item",

select_item

a user selects an item from a list

event: "view_item",

view_item

a user views an item

event: "add_to_cart",

add_to_cart

a user adds items to cart

event: "add_to_wishlist",

-

a user adds items to wishlist

event: "view_cart",

-

a user views their cart

event: "remove_from_cart",

remove_from_cart

a user removes items from a cart

event: "begin_checkout",

-

a user begins checkout

event: "add_shipping_info",

add_shipping_info

a user adds shipping info 

event: "add_payment_info",

add_payment_info

a user adds payment info 

event: "purchase",

-

a user completes a purchase

event: "refund",

-

a user receives a refund

event: "view_promotion",

view_promotion

a user sees a promotion item

event: "select_promotion",

select_promotion

a user clicked a promotion item

How to use Google Analytics 4 Enhanced E-commerce

 Click here to expand...

1. Activate GA4 Enhanced E-commerce for the Point of Sales 

Login to your SecuTix back-office, and activate enhanced e-commerce for the corresponding Internet point of sales via the screen Organisation > Initialisation > Organisation Parameters > Sales Channels > Point of Sale > Internet Parameters.

Wait for a few minutes for the corresponding PoS to be updated with the latest parameters.

Google Analytics 4 E-commerce tracking

Product impression and action data

 Click here to expand...

Impressions and clicks

  • On the landing page :
    • Clusters & sections views: push all products' impression data (including all products in the List view, even if the "Load more" button has not been clicked.)
    • For the carousel or slider sections, we push all prod
    • Product type view: push all products belonging to the current Product Type selected (e.g push all products of the EVENT tab, when user clicks on the
    • On Landing page section view, sending data also depends on scroll depth. This means that the data will be pushed as the user scrolls the landing page.
    • If a product card on the landing page is a Tour, we push the Tour id as the product Id.
    • If a product card is a list of timeslots/performancse, we push its' product Id (Event Id or Visit pass Id).
  • Data are also sent after user clicks on a product/promotion, and in the product/promotion details page (page just before the shopping cart)


1. Product impression

Push product impression data to datalayer.

Product impression DataLayer Example
<script>
  'event':'view_item_list'
  'ecommerce': {
    'items': [{
      'item_id':12345678,                  // Product ID, Tour ID. If on landing display multiple timeslots or multiple performances, push product ID of the Pass or Event multiple times.
      'item_name':'Romeo & Juliet',          // Product name, Tour name
      'item_brand':'Event / Drama',          // Product Family Type / Topic of the product (if set)
	  'type': 'Sport', 				 	// Product Type
      'index':0,                     // Position of a product in a given Section (landing page) or Product type (Landing page list view or Normal view). Position of a product in a Section can be different if user change the day view (Today, Tomorrow, After,...)
      'item_list_name': 'Hot topic'               // On Landing page content return Section name, on Landing page list view return Product type name (for a Product type products can be grouped by topic (sub-grouping), please set position and list by Topic name in this case
     },
     {
      'item_id':124,
      'item_name':'Product Name',
      'item_brand':'Product Brand',
      'index':1,
      'item_list_name': 'Hot topic'
     }]
   }
</script> 

2. Promotion impression (Advantage)

Push Promotion impression data to datalayer on the same pages and sections mentionned above.

Promotion (advantage) impression DataLayer Example
<script>
dataLayer.push ({
  'event':'view_promotion'
  'ecommerce':{
    'items':[{
      'item_id':177664,                            // Advantage ID
      'item_name':'Member Exclusive',                // Advantage name
      'creative':'Only for member', 

3. Product details impression

Data pushed when :

  • A product is clicked (accessing the product details page)
  • For the calculated season tickets, it is at the ticket selection page
  • For the Hospitality product family, it is at the hospitality selection page
  • At the ticket selection page.
Product details impression DataLayer Example
<script>
dataLayer.push({
  'event':'view_item'
  'ecommerce': {
    'items': [{
        'item_id':123,						// Product ID
        'item_name':'Product Name',				// Product name
		'item_variant':'SALE',					// Product is to be SOLD or RESERVED
        'item_brand':'Product Brand',			// Product Family Type / Topic of the product (if set)
	 	'type': 'Sport', 				 	// Product Type
       }]
   }
});
</script> 

4. Product click

Push Product details' data when user clicks a product, includes the additional data

Product click DataLayer Example
<script>
dataLayer.push({
  'event':'select_item'
  'ecommerce': {
    'items': [{
        'item_id':123,						// Product ID
        'item_name':'Product Name',				// Product name
		'date':'15/04/2021 - 15:30'         // Date time of timeslot, performance, match
        'item_brand':'Product Brand',			// Product Family Type / Topic of the product (if set)
	 	'item_list_name':'Hot topic'         
		'index':0						// Position of a product in a given Section (landing page) or Product type (Landing page list view or Normal view)
		'item_variant':'SALE'					// Product is to be SOLD or RESERVED
	 	'type': 'Sport', 				 	// Product Type
        }]
    }
});
</script> 

5. Promotion click

Push Product details' data when user clicks a product

Promotion click DataLayer Example
<script>
dataLayer.push ({
  'event':'select_promotion',
  'ecommerce':{
    'items':[{
        'item_id':'Promo ID',					// Advantage ID
        'item_name':'Promo name',				// Advantage name
        'creative':'Creative name',			// Advantage description
        'index':Position					// Position of a product in a given Section (landing page) or Product type (Landing page list view or Normal view)
		'item_variant':'SALE'					// Product is to be SOLD or RESERVED
        }]
    }
});
</script> 

Cart and Check-out

 Click here to expand...

1. Add or Remove products from Cart

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

Add to Cart DataLayer Example
// Measure adding a product to a shopping cart 
// and a list of product.
dataLayer.push({
  'event': 'add_to_cart',
  'ecommerce': {
    'currency': 'EUR',         // Currency code used for the PoS
 	'action':'add'     
	'items': [{                      
        'item_name': 'Museum Pass',                  // Product Name
        'item_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)
	 	'date':'03-01-2023 - 06:00'				// Date time of performance/match
        'price': '15.25',                       // Unit Price          
        'item_brand':'Visit Pass / Exhibition',     // Product Family Type / Topic of the product (if set) (same as enhanced e-commerce dataLayer)
        'item_category':'Cat A',           // Seat category 
		'item_category2':'Full price',		// tarrif type
        'item_variant': 'SALE', 
        '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 
Remove from Cart DataLayer Example
// Measure the removal of a product from a shopping cart.
dataLayer.push({
  'event': 'remove_from_cart',
  'ecommerce': {
   'currencyCode': 'EUR',         // Currency code used for the PoS
 	'action':'remove'     
	'items': [{ 
        'item_name': 'Museum Pass',                  // Product Name
        'item_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          
        'item_brand': 'Visit Pass / Exhibition',     // Product Family Type / Topic of the product (if set) (same as enhanced e-commerce dataLayer)                 
		'item_category':'Cat A',           // Seat category 
		'item_category2':'Full price',		// tarrif type          
		'item_variant': 'SALE',         
		'quantity': 1                           // Quantity remove from t cart for this product item
	 	'type': 'Sport', 				 	// Product Type
      }]
    }
});

2. Check out

Data are sent to datalayer in check out process with 2 steps: Delivery and Order confirmation (after the payment page)

Security and data layer

Please note that the payment page cannot push any data in the data layer, as this is a secure page and pushing data externally in a secure page is forbidden by the PCI certification.

When user choose a delivery mode and click on Continue

Delivery step DataLayer Example
<script> 
	dataLayer.push({ 
		'event': 'add_shipping_info', 
			'ecommerce': { 
						'step': 1, 										//check out step, (1: Delivery, 2: Summary) 
						'id':15284,									// File ID
					 	'option':'summary' 								//order summary page - where the e

When user input a voucher, select a payment method, then click on Continue to Payment

Order summary step DataLayer Example
<script> 
dataLayer.push({ 
	'event': 'add_payment_info', 
		'ecommerce':{ 
			'checkout':{ 
				'actionField':{ 
					'step': 2, 											//check out step, (1: Delivery, 2: Summary) 
				 	'option':'order-confirmation' 						//order confirmation page - where the step 2 is pushed (additional information)
					'option': 'VISA', 									//selected payment method name 
					'id':1000463, 									//File ID 
					'shipmentID': '1111111', 							// shipment ID, get from Delivery step 
					'shipmentMode': 'E-ticket', 						// shipment mode name 
					'shipping': 8, 										//shipment fee 
					'payment fee': 4, 									//payment overhead fee 
					'revenue': 35, 										//total amount to pay 
					'coupon': 'PROMO' 									//promotional code or voucher code 
					}, 
				'items': [{ 											// List of productFieldObjects inside the order. 
					'item_name': 'Triblend Android T-Shirt', 				// Product Name (mandatory). 
					'item_id':12345, 										// Product Id (mandatory). 
				 	'date':'13-01-2023 - 05:00'
					'price': '15.25', 									// Unit Price (mandatory) (same as the basic e-commerce tag). 
					'item_brand': 'Visit Pass / Exhibition', 				// Product Family Type / Topic of the product (if set)  
					'item_category':'Cat A',           // Seat category 
					'item_category2':'Full price',		// tarrif type      
					'item_variant': 'SALE',       
  • No labels