I’m trying to record events in google analytics, as prospects move through my decision tree.
I want to run a small script at the exit of each node to track their progression:
<script> ga('send', 'event', 'decision tree', 'next', 'name',); </script>
However, I get an error:
Uncaught ReferenceError: ga is not defined
I was reading here, a google group article about the issue. Apparently, it’s related to using GTM to implement google analytics.
But, I’m hesitant to implement UA, manually, because various configurations, provided in the customer GTM container, help with cross domain tracking.