Our Google Analytics implementation seems to be firing the "addTransaction" and "addProduct" events multiple times, which throws off our reporting.

Silver Contributor
Silver Contributor
We have those events firing on our order confirmation page as expected, which is great. However, it is throwing off our reporting as the events are sent to GA every time a customer looks at the order confirmation page. Is it possible to set these up so they only fire once?
3 REPLIES 3

Our Google Analytics implementation seems to be firing the "addTransaction" and "addProduct" events multiple times, which throws off our reporting.

Employee Emeritus
This is typically solved in E-Commerce by not allowing the customer to view the order confirmation page again. (The data layer order_id value is only set for the first purchase.) You can also put in a client-side fix in by setting a cookie with the transaction id. The load rule would fire your Google tag when: (1) On a page that is not the order page (no order_id value) OR (2) On the order page AND the transaction id cookie does not exist (first time order) OR (3) On the order page with order_id set AND the transaction id cookie exists AND its value does *not* match the current order_id value in the data layer Use Tealium's Persist Variables Extension to persist your transaction id in a cookie.

Our Google Analytics implementation seems to be firing the "addTransaction" and "addProduct" events multiple times, which throws off our reporting.

Silver Contributor
Silver Contributor
Ty, Thanks for your response. The load rule approach sounds good, but there is an issue. We still want to fire that GUA tag for custom events (clicks, pageview, etc) so we still need to load it. Is there anything we can do in Tealium to prevent GUA from getting e-commerce events but still be able to receive the custom events (clicks) we have set up for that page? Would it be possible to only load the ecomm extension if the order has not been viewed? We have this data and could populate it in the UDO. Thanks!

Our Google Analytics implementation seems to be firing the "addTransaction" and "addProduct" events multiple times, which throws off our reporting.

Employee Emeritus
There are probably a couple ways to do this. Current version of utag.js will bring in the GUA tag and fire for a manual utag.view call on the page (assuming the manual utag.view call would not have an order_id in the data layer passed to it.) For your scenario, you might do this: (1) Keep the load rule at "All Pages" for GUA (2) Create a JS Extension to block the extra order event from tracking (be sure to persist the current transaction id in a cookie *after* this extension runs so you capture the original order) // Sample JS Extension (scoped to GUA tag) to stop a specific event if (b.order_id && b["cp.transaction_id_coookie"] == b.order_id){ return false; }
Public