gaEcommerceEventList — GTM Variable Template for 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
Access GTM-specific APIs: dataLayer, debug mode, container settings.
Build and transform ecommerce data structures for GA4 event tracking.
Select or exclude items from collections based on criteria or predicates.
Test equality, containment, and ordering between values.
GTM Configuration
This is what you'll see when you open this variable in Google Tag Manager.
Related Variables
Same category: GTM
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;