I am working on the code of a website that uses GA4 and GTM for tracking.
Following the recommendation here: https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtm#clear_the_ecommerce_object I am pushing a { ecommerce: null } object to the datalayer prior to each event containing an ecommerce object.
As a result, the website's datalayer always ends up containing a large percentage of useless empty events, which are an annoyance in GA4 reports.
Is this normal? Is there a way to avoid this while still following the recommendation?
I have tried removing the dataLayer.push({ ecommerce: null }); commands from my code. As expected, this had the desired effect of removing the empty events from the datalayer.
However, I do not have access to the GTM account that receives the tracking data. I am worried that removing the dataLayer.push({ ecommerce: null }); commands against the recommendation of GA4's documentation may have a negative impact over there.