Adding Google Tag Manager to Angular App

Let's start capturing analytics in your Angular app. Google is in the process of phasing out the legacy ga.js and analytics.js products that ships with Google Analytics, with its new, more flexible Global Site Tag gtag.js that ships with Google Tag Manager. This is by no means an end to Google Analytics; instead, it's a shift in toward an easier-to-configure and manage analytics tool. Global Site Tag can be configured and managed remotely via Google Tag Manager. Tags are snippets of JavaScript tracking code that is delivered to the client, and they can enable tracking of new metrics and integration with multiple analytics tools without having to change already deployed code. You can still continue ...

Get Angular 6 for Enterprise-Ready Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.