Eduard J Posted February 9, 2022 Share Posted February 9, 2022 Hi, I'm facing trouble to implement push data layer code for each page I want to track via GTM. Want to create funnel from add to basket ---> purchase through out the all stages. Here is so far what I have and it is showing as custom event in GTM, but I'm unable to get information such as product name, qty, item price etc. {literal} <script> window.dataLayer = window.dataLayer || []; dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. dataLayer.push({ 'item': 'how to pull from page', 'quantity': 'how to pull from page', 'value': 'how to pull from page', 'event': 'begin_checkout' }); </script> {/literal} If anyone has experience with this I would appreciate sharing it. Thanks Quote Link to comment Share on other sites More sharing options...
Curtis69 Posted June 2, 2022 Share Posted June 2, 2022 (edited) dataLayer = window. dataLayer || []; dataLayer. push({ 'event' : 'trackEvent', 'pageType' : 'Blog', 'userID' : '12345', 'loginStatus' : 'logged in' }); Note: while event keys aren't strictly necessary for a data layer push, every tag in GTM needs an event key to trigger it. JCPenneyKiosk Edited June 3, 2022 by Curtis69 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.