Setting Up Analytics for Single Page Applications
Aamna Khan

Thanks for the article Aamna Khan. I tried but didn’t get the GTM trigger to fire. I would’ve liked to have kept all analytics event directives in GTM, but wrote the following in the app controller to get those page views.
$rootScope.$on(‘$stateChangeSuccess’, function() {
 $‘set’, ‘page’, $location.path());
 $‘send’, ‘pageview’);

Thanks again!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.