Google Analytics(分析)可以跟踪第 3 方网站上 JS 小部件内的转化吗?
我正在开发一个项目,其中包含一个 javascript 小部件,可以将其包裹在视频中以启用字幕。我想跟踪一个人将该工具嵌入到其网站上时的点击次数,以优化用户体验。
有谁知道这是否可能?
I'm working on a project that includes a javascript widget that can be wrapped around a video to enable subtitles. I'd like to track clicks when a person has the tool embedded on their site, in order to optimize UX.
Does anyone know if this is possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
自定义变量可能不是您想要的路线。他们不自己打电话;它们与其他请求一起打包。也就是说,您可以设置一个自定义变量来表示整个页面、会话或生命周期的单个状态,而不是特定事件的状态。例如,如果您想为登录的用户分配一个变量,这样您就可以轻松地细分他们的行为。
您要寻找的是事件跟踪。 它们的行为有点像综合浏览量,但最多允许 4 个数据点(类别、操作、标签和值)。这允许您执行一些操作,例如传递视频的时间戳、跟踪特定操作(例如启用/禁用字幕、播放、暂停等)。并且,通过辅助维度和高级分段,它们提供与自定义变量一样多的自定义。
Custom Variables are likely not the route you want to go. They don't make their own calls; they are packaged along with other requests. That is, you'd set a custom variable to signify a single state for a whole page, session or lifetime, not for particular events. Like, for example, if you want to assign a variable to users who are logged in, so you can segment their behavior easily.
What you're looking for is Event Tracking. They behave somewhat like pageviews, but they have up to 4 data points allowed (category, action, label, and value). This allows you to do things like pass the video's time stamp, track particular actions like enable/disable captions, play, pause, etc. And, with secondary dimensions and advanced segmentation, they offer just as much customization as custom variables.
是的。您很可能正在处理自定义变量的实现谷歌分析。
以下是 Yottaa 的示例使用自定义变量来测量页面加载时间,这也是一个基于JavaScript的事件。
Yes. You're most likely dealing with an implementation of custom variables in Google Analytics.
Here's an example of how Yottaa used custom variables to measure page load time, which is also a JavaScript-based event.