Adding Google Analytics to a web application is typically a straightforward process. However, when you make the jump to a Single Page Application (SPA) framework, such as AngularJS, things get a little more complicated for Google Analytics. Because of Angular's
ng-view directive (within your
index.html) injecting content upon route changes, the tracking necessary for Google Analytics does not get updated upon such events. Luckily, Angular's community has stepped up to this challenge and produced a third-party module called
angular-google-analytics that resolves the challenges faced in this endeavor. The
angular-google-analytics module resolves our worries by providing a service that sends a new pageview event ...