Virtual Pageviews Or Event Tracking – Which Is Right For You?

An interesting challenge came across my desk this week. A site owner had installed a new contact form plugin on their WordPress website and they were struggling with tracking the submissions. The form submit button triggered some JavaScript and didn’t then open its own thank you page within the site.

The problem?

Virtual Pageviews were previously chosen as the necessary method of seeing submissions. The new form was not recording those Virtual Pageviews. Something was wrong with the tracking setup when using the new contact form handling system.

Unfortunately, the need for this new form was predicated by an old SEO company removing a form from the client’s site when the client decided to move on to a new SEO firm. The ethics behind this garbage is a whole other issue and post….suffice it to say, the client had to get things setup and tracking again.

My first question was: why use Virtual Pageviews and not use Event Tracking?

I generally prefer Event Tracking for most button click actions that we want to track.  There are some pros and cons to each type of tracking that we need to look at before we determine what works best for any given situation.

According to Google Analytics help, figuring out what and when is pretty simple. If you read between the lines I think they’re saying “use Event Tracking unless you want to configure a Goal – then use Virtual Pageviews.”

Are Virtual Pageviews Right For You?

Pros:

  • Supports goal configuration – cannot configure a goal with an event
  • Doesn’t artificially inflate bounce rate

Cons:

  • Artificially inflates pageviews for the site
  • Limited information available – events are much more robust or correlating conversions and user behavior

Configuration Of Virtual Pageviews

You must adjust the code within the form, link, or submission button you want to configure as a virtual pageview.

You should add the following code to the item you want to track:

This code should be appended to the action “link” within your code – it does not get added to your Google analytics tracking script.

Here is an example of how to incorporate this into your link coding:

Should You Use Event Tracking?

I have penned previous articles about Event Tracking. I think it solves a lot of issues we have with tracking things that might not be inherently trackable in the standard installation of Google Analytics. I also like the ability to see the interactions with thinks like buttons and videos, and connecting those interactions with conversions.

The one drawback with event tracking is the inability to include an event in a goal setup. Frustrating, but using Virtual Pageviews can help with that.

Pros

  • Reduces bounce rate
  • Doesn’t inflate pageviews like a virtual pageviews does
  • Can see quite a lot of detail around events, including conversions. It’s easier to correlate data with an Event

Cons

  • You can’t include an event in a Goal setup because you can’t assign an event its own page name like you can with a Virtual Pageview.

Configuring event tracking has been covered before, for step-by-step instructions look at this Event Tracking 101 article.

So what is right for you?  That depends upon what information you’re trying to understand, and how you want to understand it.

In my opinion, if Google could make Events work nicely with Goal setup – the need for the Virtual Pageview would likely be obsolete. I might be wrong, are there instances where you’d need a Virtual Pageview instead of an Event that don’t involve goal tracking? Let us know what you think.

Postscript: A few great readers showed me that Google actually does integrate Events with Goal tracking. This makes some of our issues much easier to solve. If you can edit your submit buttons, links, forms, etcetera and add an event tracking code to the link, you’re able to have event and goal information.

This doesn’t apply to measuring actions that cannot be edited such as plugin forms on blogs. There can be a way to add the event tracking if you’re savvy enough to hack the plugin without breaking it. You can also use virtual page views to track interactions that dont change the URL – such as a change in how a script or function runs on the site.

Opinions expressed in the article are those of the guest author and not necessarily Search Engine Land.

Related Topics: Channel: Analytics | Google: Analytics | Search & Analytics

Sponsored


About The Author: is the co-founder of Ignitor Digital, along with long-time colleague Mary Bowling. At Ignitor, Carrie tackles tough technical SEO roadblocks many small business owners don't even know they have. Her experience with analytics and troubleshooting helps her get to the root of issues. When not working, Carrie loves to cook for friends and family, hang out with her pretty awesome kids, and read books that have little-to-no educational value! You can also follow Carrie on twitter, @carriehill.

Connect with the author via: Email | Twitter | Google+ | LinkedIn



SearchCap:

Get all the top search stories emailed daily!  

Share

Other ways to share:

Read before commenting! We welcome constructive comments and allow any that meet our common sense criteria. This means being respectful and polite to others. It means providing helpful information that contributes to a story or discussion. It means leaving links only that substantially add further to a discussion. Comments using foul language, being disrespectful to others or otherwise violating what we believe are common sense standards of discussion will be deleted. Comments may also be removed if they are posted from anonymous accounts. You can read more about our comments policy here.
  • http://twitter.com/thompsonpaul Paul Thompson

    The new version of Google Analytics has allowed tracking Events as Goals for over a year now. This was actually one of the big improvements in V5
    http://analytics.blogspot.ca/2011/04/new-google-analytics-events-goals.html from April last year.

    Given that all users have been pushed to the new version of GA for some time now, why are you still stating that Events can’t be used as Goals?

  • http://www.facebook.com/carrie.hill1 Carrie Hill

    Hi Paul, as i stated on Twitter – I found this article as a source when writing my article: 
    https://developers.google.com/analytics/devguides/collection/gajs/asyncMigrationExamples#VirtualPageviews.  

    Your sourced article didn’t come up in the search I did within Google Analytics help, or Google.com itself, but you might be on to something.  I’m definitely going to try it – we might have just solved the whole problem.

  • http://twitter.com/electricmice Justin Goodman

    A virtual pageview is great for website setups that otherwise dont change the url with a change in the page experience. However, for tracking an action, at this point i do not see any need to use a virtual pageview. The current event goal setup makes it obsolete for pageviews to be used to track events anymore. they can now do what the name implies and fire a pageview when the url otherwise wouldn’t change for GA to read. 

  • http://www.facebook.com/carrie.hill1 Carrie Hill

    Hi Guys,
    Thanks so much for your comments -I’m testing the event/goal tracking right now – will probably have an update to this article when I’m finished.

    The particular client mentioned above wouldn’t have been able to track this “submit” as an event because he didn’t have access to the “submit” button contained in the plugin without some pretty fancy “hacking” of the plugin, something he’s not qualified to do – and we got him set up with the virtual pageview goal without any hacking required.

    That being said, I think this will solve the problem for a lot of users that DO have access to their buttons to track an action.  

    Thanks again for your input – this is the great thing about our community – everyone helps out!Carrie

  • http://twitter.com/tysonkirksey Tyson Kirksey

    Another great thing about events worth mentioning is the ability to fire “non-interaction events”, allowing one to track small interactions *without* influencing bounce rate. 

    The only downside to using events for goals is the inability to have funnels, but this is slightly mitigated with the Event Flow reports. Nevertheless, it would be awesome to be able to create funnels using a combination of pageviews and events. 

  • http://www.analyticspros.com Caleb Whitmore

    Carrie,

    Paul is absolutely correct about event tracking.  I’m surprised that you haven’t noticed the Event based option for Goal configuration in the new version that’s been around well over a year now.  If you’re going to write articles on Google Analytics features I would expect you have been using them regularly enough to notice such an important change as this.

    One of the main remaining “pros” for Virtual Pageviews that you overlooked is that using Events in place of VPV’s can make Goal Funnel measurement impossible.  I commonly see this scenario play out where someone uses Pageviews for steps, and then an Event for the “goal” action.  Doing this means you can’t have a funnel or Goal Flow visualization that shows Step A > Step B > Step C > Goal.  This means no abandonment rate calculation too, which is very important.

    Thanks for writing on the topic and I hope your next article will not only inform readers, but inform them fully and accurately.

    Best,

    -Caleb

  • http://www.facebook.com/carrie.hill1 Carrie Hill

    Hi Caleb and Tyson
    I definitely SHOULD have seen the event setup in Goal configuration – I honestly never looked.  Its one of those things that just went right past my eyes and didn’t register.  

    I do agree that Funnels would require the VPV.  the VPV is also very handy when you cannot (or shouldn’t) edit the element you want to attach the “event” to – such as a submit button within a plugin, etc.

    I’m almost done testing event goals and will have my editor post an update to this article this week.

    Thanks for your comments,
    Carrie

  • http://twitter.com/scott_benson Scott Benson

    Event tracking is great.  I’ve often used this to calculate a user engagement level on social sharing / following buttons.  

    Also firing an event AND a custom variable allows you to segment your visitors by action (event = a goal) and to bucket these visitors into a group like “socially engaged” if they share your content or click-through to your social profiles.   

  • http://www.facebook.com/brian.jensen.969 Brian Jensen

    Great read and topic. I’m currently studying for my GA certification test and this is a topic where I found the additional insight useful. 

 

Get Our News, Everywhere!

Daily Email:

Follow Search Engine Land on Twitter @sengineland Like Search Engine Land on Facebook Follow Search Engine Land on Google+ Get the Search Engine Land Feed Connect with Search Engine Land on LinkedIn Check out our Tumblr! See us on Pinterest

 
 

Click to watch SMX conference video

Join us at one of our SMX or MarTech events:

United States

Europe

Australia & China

Learn more about: SMX | MarTech


Free Daily Search News Recap!

SearchCap is a once-per-day newsletter update - sign up below and get the news delivered to you!

 


 

Search Engine Land Periodic Table of SEO Success Factors

Get Your Copy
Read The Full SEO Guide