使用谷歌分析来捕获触摸事件?

发布于 2025-01-05 18:09:36 字数 65 浏览 3 评论 0原文

您可以使用谷歌分析来捕获ios触摸事件,例如浏览器中的点击和滑动吗?是否还可以报告事件发生地点的 x 和 y 坐标?

Can you use google analytics to capture ios touch events such as taps and swipes in the browsers? Is it also possible to report back on the x and y coordinates of where it happened?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

云胡 2025-01-12 18:09:36

我建议使用移动 JavaScript 库,例如 Zepto

它具有类似 jQuery 的 API 和特定于触摸事件的方法。

因此,您可以执行以下操作:

$(".slider").swipe(function(){
    _gaq.push(["_trackEvent", "Gesture", "Swipe"]);
});

在此处查看文档:https://github.com/madrobby/zepto

I'd recommend using a Mobile JavaScript library like Zepto.

It has a jQuery-like API, and methods specific to touch events.

So, you could do things like:

$(".slider").swipe(function(){
    _gaq.push(["_trackEvent", "Gesture", "Swipe"]);
});

Check out the documentation here: https://github.com/madrobby/zepto

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文