0
votes


I track eCommerce transactions with GA and GTM, and trying to create a custom metric which will count how many people are involved in each transaction. So I created a hit-scoped custom metric and try to pass its value along with the transaction tag in GTM:

Please see screenshot here:

Adding a custom metric to transaction hit



As we know, a transaction in GA is a series of hits: one "transaction" hit and one or more "item" hits. The problem is that GTM sends the custom metric value with ALL of the hits, not just with one. So when I use my hit-scoped metric to measure something, it's measured more than once.
For ex., in a transaction where 2 people are involved, this value (2) is send twice (once with "transaction" hit, once with "item" hit) and in the GA reports I see figure 4 (instead of 2) associated with this transaction.

I didn't find a way to ask GTM to send the custom metric just once.
Am I missing something here? Any suggestions?
Thanks!

1

1 Answers

0
votes

You can use a separate tag with the custom metric information, which is triggered on the same event as the transactions. This will create another request to GA, which isn't the best solution in terms of performance.

Maybe you can combine this information with a tag, which is already triggered on the same page? An "all pages" Universal Analytics tag is maybe present and has the information {{QuantityOfInsured}} available at the time the "all pages analytics tag" is triggered.