Round-Trip PDF Tracking with Virtual Pageviews and Campaign Tags

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

Campaign Parameters for Inbound Links from Documents

URL Builderview at full size

Use the URL Builder to configure campaign parameters for inbound links from documents.

A previous post discussed campaign parameters for inbound links from emails to prevent the clickthroughs from appearing in your reports as direct traffic. This also applies to inbound links to your site from documents such as PDFs: use campaign parameters, or resulting traffic will be treated as direct.

As with all Google Analytics campaign tracking, you can choose your own parameters, and you should make sure to use a naming convention that will generate organized campaign data.

From a PDF, for instance, you might specify the following campaign parameters:

• utm_medium-doclinks

• utm_source-pdf

• utm_campaign-winter-catalog.pdf

From a PowerPoint deck that your Website visitors can download, you might use the campaign parameters below:

• utm_medium-doclinks

• utm_source-powerpoint

• utm_campaign-conference-presentation.pps

You can use any parameters that will generate meaningful and structured campaign data. Take advantage of the URL Builder to ensure correct formatting.

Special thanks to Mohammed Huzaifa for highlighting campaign parameters in inbound document links as a new question on Google Analytics Test.

Please share this post:
Facebook Twitter Plusone Linkedin Email

You Don’t Need to “Set Up” Campaigns – Just Tag Your Inbound Links

Campaigns reportview at full size

Campaigns are defined only by tags on inbound links and not through any campaign “setup” per se.

You may hear references to “setting up” a campaign in Google Analytics, but no campaign setup per se is required, since a campaign is defined only by the campaign parameters, or “tags”, that you append to your inbound URLs.

In some instances, such as the AdWords Autotagging option and the automatic tagging that certain emailing platforms provide, you do not have to tag your links manually. In all cases, however, it is only the campaign tags, and not any setup within Google Analytics itself, that define the campaigns.

This means that you could configure campaign links that point to any website. This could be potentially useful if you’re sending campaign traffic to a partner site, even if you’re limited to read-only access (or have no direct access) to Google Analytics for the site.

Of course, campaign tracking won’t work correctly on your site or any other if the tags are not formatted correctly, so make sure to use the Google Analytics URL Builder whenever you’re “setting up” a campaign.

Please share this post:
Facebook Twitter Plusone Linkedin Email

Add Campaign Parameters Before Shortening URLs

Add campaign parameters to a URL before shorteningview at full size

You can add campaign parameters to URLs before shortening for social posts.

As with any inbound campaign link, you can track the performance of your social campaigns by tagging any associated inbound link with Google Analytics campaign tracking parameters.

Even if you already track clickthroughs directly through the analytics within shortening services such as and, you’ll gain insight into metrics such a goal completions within Google Analytics if you append the campaign parameters to your URLs, as in the example below, before shortening.

As with other instances of campaign parameters, it’s recommended to use the Google URL builder just to be certain of correct configuration.

Please share this post:
Facebook Twitter Plusone Linkedin Email

Add Campaign Parameters to Inbound Links in Press Releases

Campaigns Reportview at full size

Use campaign parameters to track visits and conversions generated from press releases.

Unlike a banner ad that may run on a single site and might therefore be trackable as a single referral source, press releases are designed to be disseminated as broadly as possible.

To measure the traffic and conversions that your press releases are driving on your website, it is therefore essential to attach campaign parameters to all inbound links in your press releases as follows:

With your inbound links tagged as in the example above, you’ll be able to trace activity back to individual press releases, all press releases as a medium, and separate press release distribution channels as sources if you post to more than one.

Please share this post:
Facebook Twitter Plusone Linkedin Email

12 Google Analytics Resolutions for 2013


1) Set up goals for all form submissions.

Goals aren’t retroactive, so make sure to set them up for all form submissions as early as possible in your Google Analytics implementation. Without conversions, there are no conversion rates.


2) Learn the ins and outs of funnels.

Once you have a goal, it’s very useful in many instances to build a funnel on top of it so Google Analytics can calculate metrics such as Abandonment Rate, but to use funnels most effectively, you should understand a few of their idiosyncrasies and limitations.


3) Don’t ignore Page Value.

The unassuming and underused Page Value metric (formerly $index) is indispensable in determining which pages are pulling their weight towards goal conversions and e-commerce transactions. (For this reason, make sure to assign values even to non-monetized goals, in a separate profile if you don’t want to skew actual e-commerce and goal monetization.)


4) Tag all inbound links with campaign parameters.

How effective is your monthly email newsletter at driving visits and conversions? How about your press releases? There’s no excuse to be in the dark on these basic questions – tag those links!


5) Track PDFs views and external links with Virtual Pageviews or Events.

It’s easy to forget that views of PDFs (and most other document formats) and clickthroughs to external sites are not captured with the default, pageview-based Google Analytics Tracking Code. Virtual Pageviews and Events provide an easy solution.


6) Avoid the built-in “Non-paid Search Traffic” Advanced Segment.

Lumping branded organic traffic and non-branded organic traffic is, for most purposes, a very bad thing. Define your own non-branded organic Advanced Segment. (And define other Advanced Segments of your own as well – better segmentation generates better insights.)


7) Track different social actions differently.

A Facebook Like that originates from your website can mean two very different things. Understand how social actions differ and track them appropriately.


8) Keep a chronology with Annotations.

When did the new home page go live? When was our company mentioned in the Wall Street Journal? You can’t make correlations between your Web data and relevant events if you don’t remember when those events happened. Maintain a comprehensive timeline with the convenient Google Analytics Annotations feature.


9) Incorporate qualitative evaluations into your conversion optimization plan.

An in-person or online user test can quickly reveal a conversion pitfall that could otherwise lurk in your Google Analytics reports indefinitely.


10) Run Content Experiments regularly.

Nothing like a head-to-head contest to tell you quite definitively what works better for conversions. If you haven’t yet run a Content Experiment or used a third-party A/B testing tool, start now.


11) Establish core KPIs (key performance indicators), and check them at least monthly.

As Brian Clifton says, Web analytics is like going to the gym: if you don’t do it regularly enough, you’re not going to be satisfied with the results. Consistent scrutiny of meaningful KPIs will lead to useful and actionable insights across the board.


12) Use Those Same KPIs for Daily or Weekly Custom Email Alerts

Don’t wait unnecessarily to find out that visits or conversions have dropped by 20%. Take advantage of Custom Intelligence Events to actively monitor your essential metrics and receive email alerts for substantial deviations.


Best wishes for a customer-focused, data-driven, conversion-optimizing new year!

Please share this post:
Facebook Twitter Plusone Linkedin Email

Use Campaign Parameters to Track Email Clickthroughs

view at full size

You need to add campaign parameters to your inbound links for email clickthroughs to count towards a campaign.

By default, Google Analytics tracks only three values for the Medium dimension:

  • (none) – for direct traffic
  • organic – for clickthroughs that are 1) from sites that Google Analytics recognizes as search engines and 2) not tagged with campaign parameters
  • referral – for clickthroughs that are 1) not from sites that Google Analytics recognizes as search engines and 2) not tagged with campaign parameters

Take special notice that there’s no default “email” medium.

Unless the inbound links in your newsletter and marketing emails are tagged with campaign parameters, any clickthroughs will count either as direct traffic in the case of a desktop email client such as Microsoft Outlook, or as referral traffic in the case of an online email client such as Yahoo or Hotmail.

Particularly confusing is that inbound links from Gmail appear in Google Analytics as “organic” (instead of “referrer”).

You can easily avoid this confusion and instead specifically track email as a medium by adding campaign parameters to all inbound links in emails:


You can use the Google Analytics URL Builder to make sure that you’re using the correct parameter names.

The order of the parameters names is not important, and you can mix them with other URL parameters:


Some email newsletter platforms can automatically append Google Analytics campaign parameters. Take advantage of this option if it’s available; otherwise, make sure to manually add campaign tags to all inbound links from emails. You need to know exactly how many visits and conversions are originating from this source.

Please share this post:
Facebook Twitter Plusone Linkedin Email