谷歌分析有没有办法像 Mixpanel 一样跟踪多个事件参数? [英] Is there any way for Google Analytics to track multiple event parameters like Mixpanel?

查看:20
本文介绍了谷歌分析有没有办法像 Mixpanel 一样跟踪多个事件参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给定:

_trackEvent(category, action, opt_label, opt_value, opt_noninteraction)

我尝试使用 opt_label 但它似乎只是一个字符串,并且不接受像 Mixpanel 那样的不同参数的散列.

I tried with opt_label but it seems like it's just a string and doesn't accept a hash of different parameters like Mixpanel do.

我怀疑解决方法之一是使用自定义变量?但文档似乎令人困惑.感谢任何建议.

I suspect one of the the work around is using custom variables? But the docs seems confusing. Appreciate any advice.

推荐答案

虽然您当然可以在 Google Analytics 中完成这项工作,但其他分析服务(如 Mixpanel、KISSmetrics、Kontagent 等)专注于事件分析并为您提供更大的灵活性.话虽如此,您可以破解 Google Analytics(分析)事件模型以获得所需的内容.

While you can certainly make this work in Google Analytics, other analytics services like Mixpanel, KISSmetrics, Kontagent, etc specialize in event analysis and give you more flexibility. Having said that, you can hack the Google Analytics event model to get what you’re looking for.

如果您想在 Google Analytics 中跟踪每个事件的多个参数,我建议您将要跟踪的参数塞入事件标签中.这是可行的,原因有两个:事件标签可能真的很长(实际上长得可笑),而且 Google Analytics(分析)提供了灵活的过滤和细分选项.

If you want to track multiple parameters for each event in Google Analytics I’d suggest cramming the parameters you want to track into the event label. This is workable for two reasons: Event labels can be really long (ridiculously long, actually) and Google Analytics provides flexible filtering and segmentation options.

因此,为了扩展之前回答中讨论的示例,您可以有一个用于跟踪视频播放详细信息的事件,如下所示:

So, to extend an example discussed in an earlier answer, you could have an event for tracking video play details that looks like this:

_gaq.push(['_trackEvent', 'Videos', 'Play', 'title:MoreCatLolz, 
    percentPlayed:63, adShown:true, res:480p, fullScreen:false']);

我们所做的只是将一些任意参数放入事件标签字符串中,以便我们稍后将其取出.要分析结果,您可以过滤事件报告以显示MoreCatLolz"视频与广告一起显示的次数:

All we've done is toss a few arbitrary parameters into the event label string in such a way that we can pull them out later. To analyze the results you could filter your event reports to show, say, the number of times the ‘MoreCatLolz’ video was shown with ads:

或者,使用高级细分和正则表达式,您可以计算用户观看了至少 90% 的任何视频的访问次数:

Alternately, using advanced segments and regex, you could count the number of visits in which users watched at least 90% of any video:

要跟踪持久的用户数据,例如姓名、加入日期、级别、购买次数等,我建议使用访问者级别的自定义变量,这些变量会自动包含在每个跟踪调用(包括事件)中,并允许您应用许多相同的分析技术.

To track persistent user data, such as name, join date, level, purchase count, etc., I’d suggest using visitor-level custom variables which are automatically included with every tracking call (including events) and allow you to apply many of the same analysis techniques.

这篇关于谷歌分析有没有办法像 Mixpanel 一样跟踪多个事件参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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