Skip to content

gaEcommerceEventList — GTM Variable Template for GTM

VARIABLES › GTM
gaEcommerceEventList CORE GTM

Returns an array of all Google Analytics 4 ecommerce event names as defined in the GA4 specification. Useful for validation, filtering, or conditional logic based on ecommerce events. ___________ ✏️ Example Output: ["add_payment_info", "add_shipping_info", "add_to_cart", "add_to_wishlist", "begin_checkout", "purchase", "refund", "remove_from_cart", "select_item", "select_promotion", "view_cart", "view_item", "view_item_list", "view_promotion"]


When to Use This

GTM Utilities

Access GTM-specific APIs: dataLayer, debug mode, container settings.

GA4 Ecommerce

Build and transform ecommerce data structures for GA4 event tracking.

Filtering

Select or exclude items from collections based on criteria or predicates.

Comparison

Test equality, containment, and ordering between values.


GTM Configuration

This is what you'll see when you open this variable in Google Tag Manager.

Read-only Preview
gaEcommerceEventList
This function takes no parameters.


Under the Hood

📜 View Implementation Code
/**
* Returns a list of Google Analytics 4 ecommerce event names.
* 
*
* @returns {Array} Array of GA4 ecommerce event name strings.
*
* @framework ggLowCodeGTMKit
*/
const gaEcommerceEventList = [
  'add_payment_info',
  'add_shipping_info',
  'add_to_cart',
  'add_to_wishlist',
  'begin_checkout',
  'purchase',
  'refund',
  'remove_from_cart',
  'select_item',
  'select_promotion',
  'view_cart',
  'view_item',
  'view_item_list',
  'view_promotion'
];
return gaEcommerceEventList;