The navigator.geolocation api for user positioning is now also supported by Firefox and not just Safari/Iphone. I suspect it will become a well suported api as more devices support positioning.
用户定位的navigator.geolocation api现在也支持Firefox,而不仅仅是Safari / Iphone。我怀疑它将成为一个很好的支持api,因为更多的设备支持定位。
Anyone know how to detect support of this api so that google analytics can chart it?
任何人都知道如何检测这个api的支持,以便谷歌分析可以绘制它?
1 个解决方案
#1
I'm unsure of the exact code, but you should be able to use custom tracking events. Here's some some psuedo code:
我不确定具体的代码,但您应该能够使用自定义跟踪事件。这里有一些伪代码:
if (navigation.geolocation) {
_trackEvent(category, action, optional_label, optional_value)
}
#1
I'm unsure of the exact code, but you should be able to use custom tracking events. Here's some some psuedo code:
我不确定具体的代码,但您应该能够使用自定义跟踪事件。这里有一些伪代码:
if (navigation.geolocation) {
_trackEvent(category, action, optional_label, optional_value)
}