Hi!
We recently retired our Google Universal Analytics tag and added a Gtag.js. The problem is that a lot of very specific events are firing with this tag that we never coded. For example the Purchase event on the Thank You page. Category is Ecommerce and value is some big number. So I commented out these pieces of code in the tag template
/* if ( !u.data.event_name && u.data.order_id ) {
u.data.event_name = "purchase";
} */
/*"purchase": [{ "name":"transaction_id", "required": true }, { "name":"value" }, { "name":"currency" }, { "name":"tax" }, { "name":"shipping" }, { "name":"affiliation" }, { "name":"coupon" }, { "name":"items" }, { "name":"trip_type" }, { "name":"passengers"} ],
*/
There are 2 identical GA tags for Dev and Prod with the load rule in terms of the URL being different. I made this change in both tags and the Dev tag does not fire the Purchase event on the Thank You page. That is, on the Test store.
On production this change (commenting out) is not helping at all. So I'm out of ideas. I need to either prevent this event from firing or catch hold of that utag.link (wherever it is coming from) and let it continue only if it does not fire the Purchase event. Will appreciate any help!
... View more