My favorite solution for tracking file downloads, hands down, is… Tracking downloads using Google Tag Manager There are several automated solutions for tracking downloads on your website.
Automation is also a better solution if you need to track many downloadable files.
Automated download trackingĪdding event tracking code to one file isn't overly complicated.īut if you don't want to add code to your files manually, there are automated alternatives. Non-interaction events don't affect your bounce rate at all. Interaction events can be used to track bounce rate more precisely. It tells Google that something did, or did not happen based on the user interacting with your webpage. Interaction EventsĪn interaction event is a true or false type of command that exists within the event code. In the event code, you can also tell Google to assign a value to the event. It also tells Google the action that occurred and gives that action a label. The event code sends a hit to Google with the category of the event. Common examples of events include video views, page scrolling, or file downloads. Usually, events are actions on the pages of your website. Or you can use a plugin that puts the event tracking code in place for you.Įvent tracking is critical to understand because it's a fundamental part of Google analytics.Įvent tracking is how you tell Google Analytics to record user behavior that doesn't automatically trigger your tracking code. You can put some additional code on your website. There are a couple different ways to set up event tracking. You can use event tracking, or you can create what's known as a virtual pageview. There are two ways you can tell Google to track downloads on your website. Using event tracking and virtual page views to track downloads
You have to tell Google Analytics what you want to track, and how to track it. If you want to track events that don't execute browser-based code, you have to do some extra work. If the user's action doesn't trigger your code, Google Analytics won't track it. The same applies to user activity on a web page. So the standard Google Analytics tracking code does not record file downloads.
PDFs and other types of downloadable files don't trigger JavaScript. But what about web-based activity that doesn't execute JavaScript? The base Google Analytics code is built in JavaScript, so it can track anything that executes JavaScript. Why? Because web pages execute JavaScript when they load in your browser. Google Analytics loves to track pageviews. Why doesn't Google Analytics automatically track downloads?