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

  • Oliver

    Member
    16 January 2023 at 10:53 am

    Hey, so looking at your code I spotted this bit:

    dataLayer.push({ ecommerce: null });
    

    The issue here is that the word “null” is actually making the dataLayer not work. Think of “null” like a giant off switch. By including it, you’re essentially pressing pause on all things dataLayer. What you should do is take out that line and it should be functioning properly then.