Quantcast
Channel: Google Analytics Tip of the Day
Viewing all articles
Browse latest Browse all 105

Round-Trip PDF Tracking with Virtual Pageviews and Campaign Tags

$
0
0
Pages reportview at full size

All virtual pageviews are integrated into the Pages report.

For the simple reason that PDFs do not contain the Google Analytics tracking code, links to PDFs do not, by default, generate data in Google Analytics.

So what we can do? We can generate a virtual pageview on the click action as in the code below, before the PDF even loads.

<a href="/catalog.pdf" onclick="ga('send','pageview','virtual-catalog-pdf')">Download our catalog</a>

In this way, we can generate virtual pageviews that will appear integrated into the Pages report and will act is the equivalent of a virtual page for all other purposes in Google Analytics, such as goals and funnel steps.

But how do we track links back to our website from a PDF? By default, a link back to your site from a PDF would count as direct traffic since there would be no referring website that GA could record. To make these clickbacks trackable, you can add campaign parameters, also called campaign “tags”, to your inbound links.

Please share this post:
Facebook Twitter Plusone Linkedin Email

Viewing all articles
Browse latest Browse all 105

Trending Articles