Google Tag Manager with AngularJS?
问题 How do I use GTM with Angular? I'm trying to fire a (virtual) pageview event when I load a new partial using this code: dataLayer.push({ 'event' : 'pageview', 'pageview' : $location.path(), 'virtualUrl' : $location.path() }); But I don't see the event firing (I'm using the Google Analytics Chrome debug extension to view fired events). 回答1: I find the Chrome extension unreliable. Simply run the global variable dataLayer in the console to print the array of events. One of the objects should be