Virtual Pageviews Vs. Event Tracking

每个项目产品都要加埋点,加500行埋点是不是会占用你一两天的时间而且很容易犯错,想只用一小时准确加完这500行埋点剩下一天喝茶聊天么?来试试这520工具,高效加埋点,目前我们公司100号前端都在用,因为很好用,所以很自然普及开来了,推荐给大家吧

http://www.520webtool.com/

自己开发所以免费,埋点越多越能节约时间,点两下埋点就加上了,里面有使用视频

转自于:https://www.ironistic.com/virtual-pageviews-vs-event-tracking/

I recently ran into dilemma helping out a client with tracking conversion goal funnels for ajax forms. In other words, there are no individual URLs for steps within the conversion funnel or even a confirmation page for that matter. They wanted to be able to track form completions independently. They also want to analyze at which point individual users abandoned the goal conversion path.

After some deliberation and additional research, I came to the conclusion that the best way for them to do this (without completely rebuilding large portions of their site that a different company built) was to implement code for virtual pageviews. However, virtual pageviews may not always be the best solution, as they will increase the total pageviews you see in your Google Analytics reports. So for today’s post, I am going to explain the difference between virtual pageviews and event tracking and demostrate situations where you should use one versus the other.

Event Tracking

What is Google Analytics event tracking?

I wrote past rambling that goes into the details of adding event tracking in Google Analytics. This prior post will show you how to implement event tracking on your website. Event tracking is a fairly easy way to track user engagement on a website that the standard Google Analytics code will not automatically track for you. For example, this would allow you to track clicks on elements such as Email text links, phone number click to call links or views of a video embedded on a page (and much more). This comes in handy when you are multi-variant testing!

One thing my original event tracking blogpost won’t tell you is that there is also a WordPress plugin called GA Event Tracking that I’ve come to love . If you have a website on WordPress, this can be an easier alternative to adding in the code on every element of the site. You simply identify the class or id of an element and assign the category, action, and label for each event you wish to track.

When to use event tracking?

Use event tracking if you want to track any user click on: an Email address, click to call link, video link, document download link, or if you want to track specific CTAs throughout your website. You can also set up conversions in Google Analytics to track a goal conversion anytime a defines event happens (but keep in mind that events can not be used to set up goal conversion funnels).

Virtual Pageviews

What are virtual pageviews in Google Analytics?

Virtual pageviews are implemented by adding a snippet of code to various elements of a website in order to track specific actions as pageviews. Setting up a virtual pageview will allow you to assign a unique URL to an action taken on just about any element. *Note* using virtual pageviews WILL count toward your total pageviews, pages per session, bounce rate, etc. so make sure you have an actual need for virtual pageviews before you choose this method.  Think back to my original example of the form using ajax with no confirmation page or unique URL. You could add a virtual pageview to the next and submit buttons within the form. This could also be done using event tracking, but herein lies the dilemma and the deciding factor for this particular example.

The syntax to implement virtual pageviews in Universal Analytics (analytics.js) is as follows:

ga(‘send’, ‘pageview’, ‘page path’)

Page path is where you will set what you want the virtual page URL to be. For a quick reference example, you are trying to track a “next step” blink in a multi-step form. Your code could look something like:

<a href=”#” ga(‘send’, ‘pageview’, ‘form-step-two’)>Next Step</a>

When to use virtual pageviews?

Typically, I would recommend using event tracking over virtual pageviews because of the impact it has on overall site metrics. That being said, if you need to track these actions within a goal conversion funnel, you will need to use virtual pageviews. Goal conversion funnels can only be set up using unique URLs for each step within the funnel. Virtual pageviews will allow you to assign unique URLs to these actions allowing you to incorporate that action into a goal conversion funnel. Once you have the virtual pageviews implemented, you will set up your goal conversion just like any other. Identify the steps and watch the data roll in. After you get rolling, it will look something like this:

 

It can be difficult to determine if you should use virtual page views or event tracking to analyze user behavior. You need to ask yourself a few questions to determine which method is best for your particular situation.

  1. Do you wish to use these actions within a goal conversion funnel?
    1. If you answered yes, you’ll want to use virtual pageviews.
    2. If you answered no, you’ll want to use event tracking.
  2. Do you find it acceptable for your method to impact other reporting metrics such as total pageviews, pages per session, and bounce rate?
    1. If you answered yes, you can use virtual pageviews.
    2. If you answered no, you’ll want to use events.
  3. Do you want to be able to track a simple goal completion based on this action?
    1. If you answered yes or no, events or virtual pageviews can both be used in setting up a goal conversion.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值