Open karthikctelia opened 1 month ago
Why do we always need to do the below before pushing ecommerce event to dataLayer. It doesn't make sense from dataLayer perspective as we just push to dataLayer , it doesn't clear the existing key. It just pushes new object. dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtm#view_item-gtm
dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object.
Why do we always need to do the below before pushing ecommerce event to dataLayer. It doesn't make sense from dataLayer perspective as we just push to dataLayer , it doesn't clear the existing key. It just pushes new object.
dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object.
https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtm#view_item-gtm