5 Google Tag Manager Concepts
In Chapter 4, “Account Creation and Tracking Code Installation,” we created a new Google Analytics (GA) account and a new GA property within the account. We then copied the provided tracking code into our website template so each page would execute ga('send','pageView') on each page load and thereby populate our GA property.
We’re now going to look at a different way to get data into GA: through a GA tag within Google Tag Manager (GTM). Note that Google Tag Manager does not replace Google Analytics: we’re still going to need to create a GA account and property and still send a pageview hit to GA each time a page loads.
When we use GTM, however, we do not add the native code to our pages. Instead, we start with container code. It is through the container that we will add and modify GA. We’ll also be able to use the container to add other types of marketing and analytics tags to our website.
Google Tag Manager Concepts
Google Tag Manager is Google’s free ...
Get Google Analytics Breakthrough 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.