-
Understanding the Functionality of the ecommerce Property in GTM Events
So, we’ve got these two tracking methods right now in GA4—
gtag
and GTM’sdataLayer
.gtag
doesn’t need theecommerce
attribute to work, but GTM’sdataLayer
does.
Take a look at what I mean:gtag("event", "add_payment_info", { items: [ { // item's properties } ] }); dataLayer.push({ event: "add_payment_info", ecommerce: { items: [ { // item's properties } ] } });
Are they really that different?
Yeah, I know
gtag
callsdataLayer.push
in the background. But, why does GTM need thatecommerce
property? Is it just how it’s designed or is there a technical reason behind it?
Log in to reply.