6 Events, Virtual Pageviews, Social Actions, and Errors

In the previous chapters, we learned how to record pageviews in Google Analytics (GA)—by including the default GA tracking code on all pages of our website, or by including the Google Tag Manager (GTM) container code on each page of our website and then publishing a GA pageview tracker tag to the container. Either of these straightforward approaches will immediately begin populating your GA property with pageview data but will invariably leave big gaps in understanding the full range of your visitors’ interaction with your Web pages.

To fill these gaps, you can configure events and also virtual pageviews and social tracking, all of which are covered quite thoroughly in this chapter, along with error tracking. Along the way, we’ll get a great deal of practice with GTM skills beyond basic GA tracking.

Please note that this is a lengthy chapter that delves into fairly deep technical detail and introduces some more advanced GTM functionality, so if you are a marketer or analyst, you can read through the chapter to learn the fundamentals of tracking events, virtual pageviews, social actions, and errors and then work with your developers on the implementation procedures.

The Need for Event Tracking

As illustrated in Figure 4.7, pageview tracking is quite comprehensive in the sense that each default pageview hit includes a wide range of dimension values that describe the page, the visitor’s traffic source and geographic location, ...

Get Google Analytics Breakthrough now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.