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 to Google Analytics whenever your Angular application's $location.path()
changes.
AngularJS Deployment Essentials
By :
AngularJS Deployment Essentials
By:
Overview of this book
Table of Contents (15 chapters)
AngularJS Deployment Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Our App and Tool Stack
Deploying to Apache
Deploying to Heroku
Deploying to Firebase Hosting
Deploying a Mobile App
Deploying as Chrome Apps
Conclusion – AngularJS Deployment Essentials
Index
Customer Reviews