Google 分析悬停事件跟踪
Google Analytics Hover Event Tracking
这就是我使用 GA Universal Analytics 跟踪点击事件的方式。我如何使用悬停来执行此操作?
ga('send', 'event', 'button', 'click', {'nonInteraction': 1, 'eventLabel': 'bottom-cta', 'page': document.URL, 'eventValue': 0});
仅此而已吗?
ga('send', 'event', 'button', 'hover', {'nonInteraction': 1, 'eventLabel': 'bottom-cta', 'page': document.URL, 'eventValue': 0});
要跟踪悬停事件,您仍然需要添加适当的JavaScript。例如,如果您使用 jQuery:
$("#someID").mouseover(function(){
ga('send', 'event', 'button', 'hover', ...);
)}
要点是 GA 事件参数没有定义事件的逻辑。最后还是JavaScript做到了。
这就是我使用 GA Universal Analytics 跟踪点击事件的方式。我如何使用悬停来执行此操作?
ga('send', 'event', 'button', 'click', {'nonInteraction': 1, 'eventLabel': 'bottom-cta', 'page': document.URL, 'eventValue': 0});
仅此而已吗?
ga('send', 'event', 'button', 'hover', {'nonInteraction': 1, 'eventLabel': 'bottom-cta', 'page': document.URL, 'eventValue': 0});
要跟踪悬停事件,您仍然需要添加适当的JavaScript。例如,如果您使用 jQuery:
$("#someID").mouseover(function(){
ga('send', 'event', 'button', 'hover', ...);
)}
要点是 GA 事件参数没有定义事件的逻辑。最后还是JavaScript做到了。