我可以使用Google Analytics在用户浏览器中确定HTML5支持吗? [英] Can I determine HTML5 support in my users’ browsers with Google Analytics?

查看:100
本文介绍了我可以使用Google Analytics在用户浏览器中确定HTML5支持吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Analytics能够检测访问浏览器的HTML5支持级别吗?我想知道我的访问者浏览器中有多少百分比的HTML5就绪。目前获取这些数据的唯一方法是分析访问者的浏览器统计信息,然后尝试在每个浏览器自己的帮助页面上查找支持信息。正如你可以想象的那样,这有点费时和令人沮丧。如果支持HTML5标签的话,那么它会加强我的案例,开始迁移到HTML5语义 - 我的'上级或者不明白它是什么,或者担心它是巫术。

解决方案

如果您阅读这个示例代码,您可以使用自己的javascript来检测任何客户端您需要的功能(任何特定的HTML5功能),在Google Analytics中设置自定义变量,然后从您的Google Analytics报告中追踪该变量。



根据您的问题的措辞,你应该意识到一些事情。首先,HTML5不是一个赢家通吃的事情。它不在那里或不在那里。它是数百个功能的集合,不同的浏览器已经实现了其中的许多功能。例如,IE9已经实现了一些主要的HTML5功能,但没有实现其他功能(如CSS3转换)。因此,使用上述技术,您需要弄清楚您想跟踪哪些特定的HTML5功能,为该功能设计功能测试(本文建议使用modernizr进行功能测试,因为已经内置了许多测试),然后然后将结果记录到GA自定义变量中。其次,大多数使用HTML5的应用程序将其用作用户体验的改进(如果可用),并且仍然可以与某些当HTML5功能不可用时的其他机制。这使得人们可以继续支持使用旧浏览器的浏览器(例如Firefox 3.x,IE等)。所以,通常你不应该在考虑HTML5的全部或全部。



如果您等待99%的观看者拥有您可能想要在浏览器中使用的所有HTML5功能,您将需要等待很长时间。但是,如果您希望现在向那些拥有所需HTML5功能的用户提供更好的用户体验,同时还为那些不提供合理用户体验的用户提供合适的用户体验,那么现在就可以开始使用这些新的HTML5功能。

至于令人信服的管理,对于那些具有所需HTML5功能的用户而言,改善了用户体验,同时仍然继续以旧方式支持所有其他浏览器做事情是一种低风险的概念,只要你能证明你的观众至少有一些合理的比例会从新的改进中受益。



PS我还发现了另一篇关于在GA中跟踪HTML5


Is Google Analytics capable of detecting a visiting browser’s level of HTML5 support? I'd like to know what percentage of my visitors browsers are HTML5-ready. Currently the only way of getting this data is to analyse the visitors' browser stats and then try to find support information on each of the browsers own help pages. As you can imagine this is somewhat time consuming and frustrating.

If support for HTML5 tags is high then it will strengthen my case to start migrating to HTML5 semantics - my 'superiors' either don't understand what it is or fear it is witchcraft.

解决方案

If you read this example code, you can use your own javascript to detect whatever client-side features you want (any specific HTML5 feature), set a custom variable in Google Analytics and then track that from your Google Analytics reports.

Based on the wording of your question, you should realize a couple of things. First, HTML5 is not a winner-take-all thing. It's not there or not there. It's a collection of hundreds of features and different browsers have implemented some of many of those. For example, IE9 has implemented some major HTML5 features, but not implemented others (like CSS3 transitions). So, using the above technique, you would need to figure out which specific HTML5 features you wanted to track, devise a feature test for that feature (the article suggests using modernizr for the feature test since many tests are already built-in) and then record that result to a GA custom variable.

Secondly, most applications that use HTML5 use it as an improvement in the user experience (when available) and will still work with some other mechanism when the HTML5 feature is not available. This allows one to continue to support viewers using older browsers (such as Firefox 3.x, IE, etc...). So, usually you shouldn't really be thinking about all or nothing on HTML5.

If you're waiting for 99% of your viewers to have all the HTML5 features you might ever want to use in their browser, you will wait a long time. But, if you want to start offering a better user experience now to those users who have the desired HTML5 features while still offering a reasonable user experience to those who don't, then you can start using those new HTML5 features now.

As for convincing management, the idea of an improved user experience for those that have the desired HTML5 capability while still continuing to support all the other browsers with the "old" way of doing things is a low risk concept as long as you can show that at least some reasonable percentage of your viewers will benefit from the new improvement.

P.S. I also found another article on the subject of tracking HTML5 in GA.

这篇关于我可以使用Google Analytics在用户浏览器中确定HTML5支持吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆