Choosing an analytics tool can be exciting but equally frustrating. There’s hundreds of tools that do very similar things and the cost of switching tools can be high. Before you jump into choosing the wrong tool, we need to understand a fundamental difference between analytics tools: how they track data. Specifically, we want to look at when to use the GA event tracking or the page view tracking.
Let’s get started by looking at it what it means to track pageviews or events and some helpful rules of thumb of when you should them
What Are Pageviews?
Pageviews are when a user “views a page on your site that is being tracked by an analytics tool” according to the official definition by Google. If someone views 5 pages on your site, then those are 5 pageviews. If someone views the same page 5 times, then those are also counted as 5 pageviews. Google Analytics also shows you unique pageviews which “aggregates pageviews that are generated by the same user during the same session”.
A session is the amount of a time a user spends on your website or app. They could come to your website and spend 10 minutes browsing around for 1 session of 10 minutes. They could then come back multiple times over the next few weeks and complete separate sessions of different lengths.
When you visit a page on a website, that generates a pageview. The pageview gets sent to your analytics tool alongside a bunch of other information such as:
- Location based on your IP address
- Operating system and browser
- Hardware information such as battery levels and the size of your screen
Your analytics tool then converts all this data into graphs and reports such as the one below:
You can also look at other reports that show you what your most popular pages are and what paths users are taking throughout your site. This is all created from users simply loading your website on their computer. All you have to do is add the analytics snippet to all of your pages and you’ll collect this information without any extra setup work.
In mobile devices, you have the same concept of sessions but pages are called screens and you can get similar information from users as they go through different screens in your app.
What Are Events?
Events are also data points that get sent to your analytics tool but they are usually tied to an action that a user takes. This means that events don’t get collected unless you explicitly tell your analytics tool to collect them.
You can use the GA event tracking when users complete actions such as:
- Submitting a form e.g. contact us form
- Clicking a button or a link
Once you send them to your analytics tool, events can also contain the same information as pageviews e.g. location, hardware and browser information. Your analytics will then convert your event data into the same charts and graphs that you saw above.
Now that we know the basic difference between pageviews and events, let’s look at when you should use them.
Understanding When to Use Pageviews and Events And Common Mistakes
Some tools like Google Analytics let you track pageviews and events but most tools can usually only capture one of them. Here are some rules of thumb for how to use pageviews and events:
Pageviews are great for:
- Marketing related activities e.g. your website, advertising traffic
- Your users will be mostly reading pages on product features and pricing
- There’s very little interaction by the user i.e. they are mostly reading content.
Events are great for:
- Products or apps where you need to track how users are interacting or engaging
- Users need to take clear actions e.g. completing forms, downloading files
- There’s a high level of interaction from your users to your product or app
The reason why pageviews aren’t well suited for products is that they don’t tell you what is happening within a page. They would simply show that X number of users viewed this page but sometimes you need to know what users are clicking on, where they are getting stuck and how you can improve your design to increase engagement (think products).
On the other hand, events tend to be too complex for tracking marketing activities since you’re mostly interested in where users are coming from (channels) and what pages they are visiting. You’re guiding users to sign up for your product (where you might use an event) but pageviews will give 90% of the information that you need.
Knowing this, you can start to understand why some tools like Google Analytics are better suited for marketing websites while tools like Mixpanel are better suited for products or apps. I seen companies try to set up tools like Mixpanel for tracking websites using the pageview model and it just doesn’t work out very well.
Examples of How to Use the GA Event Tracking Features
This is how code looks like when sending events to Google Analytics:
This is how the code looks like when sending events to Mixpanel:
This is how the code looks like when sending events to Kissmetrics:
Sidenote: Virtual Pageviews in Google Analytics
Google Analytics supports a slight variation of pageviews which are called virtual pageviews. These are pageviews that you sent manually to Google Analytics similar to how you would manually send events. However, they are counted as part of the overall number of pageviews within your reports.
Virtual pageviews are used to track special elements like modals and pop ups. When you open a modal, you’re still technically on the same page but you’re viewing a “new page” i.e. the modal. The GA snippet won’t track this properly though so you need to send a virtual pageview when the modal opens and when it closes.
Virtual pageviews (and events) will affect your bounce rate and I will simply link you to this support article for more information. Its minor change to how you need to consider bounce rate for these pages.
If you’re slightly confused about when to use virtual pageviews and when to use events, here is a great rule of thumb by the awesome team at Cardinal Path:
“Use an event on a verb, or an action. Use a VPV (virtual pageview) on a noun, or place.” – Dave Fimek from Cardinal Path
An Even Easier Way to Send Events and Virtual Pageviews
Finally, there’s a few other ways to send events to your analytics tool. Check out Google Tag Manager which makes it extremely easy to send virtual pageviews and events to your Google Analytics account. Here’s a great guide on how to setup and use Google Tag Manager.
If you have any tips or questions, let me know in the comments!
I find most companies are stuck with high-level metrics and they aren't able to properly understand what actually drives user growth for their web and mobile products. To do that, you need the right data and the right tools.
If this sounds like your situation, then you should download our free tracking plan (and tutorial video). This is the document that you should create before you ever implement tools like Mixpanel, Amplitude, Segment, and Intercom. Click the image below to download your own free tracking plan (and tutorial video).