Google Tag Manager (GTM) allows you to create any number of user-defined variables, based on the current state of a field in the GTM ‘data layer’.

In this example we’ll access the product list name, as set on product listing pages in a Shopify store. This follows the standard structure for Enhanced Ecommerce events.

  1. Create a NEW user-defined variable

  2. Select the Data Layer Variable type

  3. Enter the nested variable in the Data Layer Variable Name in dot notation as ‘ecommerce.click.actionField.list’