Add Custom Metric to GA Using Google Tag Manager

Comments:4

  1. Why not just add the metric to the pageview trigger itself rather than creating an event & a custom metric just to record the custom metric? Btw, How is it that your Event tag does not have a Value field?

    1. Good questions, thank you for your comment! Sure, in this example case you could add the custom metric to a Page View tag instead of an Event tag. The custom metric would be implemented in exactly the same way and have the same result. I chose to show an Event tag example though because 1) in my experience that’s a much more common use case, and 2) it keeps the Page View tag clean. In this example, if you sent the custom metric with a Page View tag instead, now you’d need to either write some new trigger logic using JavaScript, or duplicate the original Page View tag and then add blog-specific triggers and exceptions to both versions, to ensure that the custom metric only gets sent on the tags on the blog pages.

      For the second question, I’m not actually tracking this event on my site anymore (it was just for the example), but even so I don’t think I’d populate the Value field anyway since there’s no measurable monetary value to someone viewing my blog. But there’s always different approaches to measurement — would you normally add a Value here?

Leave a Reply

Your email address will not be published.