Learn business growth with Google Analytics 4 › Forums › Google Analytics 4 › Troubleshooting Shopify theme's failure to fire Google Analytics 4 ecommerce events › Reply To: Troubleshooting Shopify theme's failure to fire Google Analytics 4 ecommerce events
-
It seems like your issue could be related to the syntax in your code. The liquid variables, which output strings, should be enclosed in quotes. Additionally, consider adding conditional statements to prevent certain name-value pair from appearing when they have no values. An example of how you could adjust your code to this effect has been provided. The code shows the incorporation of quotation marks on certain variables and conditional statements to prevent the appearance of name-value pairs without values. Also note the ‘ecommerce: null’ statement before you push your ‘view_item’ event.