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...
Harrison69 Posted October 13, 2022 Share Posted October 13, 2022 I appreciate the information and advice you have shared. I will try to figure it out for more. Clover.com Quote Link to comment Share on other sites More sharing options...
Mason69 Posted January 9 Share Posted January 9 Create a Data Tag in the web GTM -> select event name -> set GTM Server Side URL -> Scroll to the settings section and enable Push event to DataLayer after tag receives a response -> add DataLayer Event Name -> Set datalayer Object Name. Change this parameter only if you renamed the dataLayer object. Fragomen Connect Login 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.