使用 Google Analytics 跟踪两种不同的用户类型? [英] Tracking two different user types with Google Analytics?
问题描述
我们的网站有两种类型的用户:
- 嘉宾
- 注册用户
我们正在寻找一种方法,可以在一个 Google Analytics(分析)配置文件中跟踪两种类型的用户.我们相信注册用户在网站上停留的时间更长,页面浏览量也高于访客.
这是否可以仅在一个配置文件中实现?
有没有办法在个人资料页面中显示自定义报告,同时显示用户的平均时间和客人的平均时间?
我知道 Analytics 是一个如此强大的应用程序,但我不是专家,我在 Google 上找不到任何东西.
谢谢.
赏金更新
我知道这与过滤器有关.请在您的回答中分享代码和分步说明.
您可以在 GA 中使用自定义变量来跟踪不同类型的用户.请查看 GA 文档中的此示例以获取更多信息.http://code.google.com/apis/analytics/docs/tracking/gaTrackingCustomVariables.html#examples
我会这样做:
- 当用户会话开始时,如果用户不是注册用户,像这样设置一个自定义变量:
- 用户登录后,使用以下代码.
现在您应该能够在报告中看到 User Type
作为自定义变量.
希望这会有所帮助.
We've got a site with two types of users:
- Guests
- Registered users
What we are looking for is a method to track both types of users within just one Google Analytics profile. We believe a registered user stays more in the site and has a higher page view count that a guest.
Could this be possible within just one profile?
Could there be a way to show custom reports in the profile page to show both user's average time and guests average time?
I know Analytics is such a powerful application, but I'm no guru and I couldn't find anything on Google.
Thanks.
Bounty Update
I know it has to do with filters. In your answer please share code and step-by-step instructions.
You can use custom variables in GA to track different types of users. Take a look at this example in the GA docs for more information. http://code.google.com/apis/analytics/docs/tracking/gaTrackingCustomVariables.html#examples
This is how I would do it:
- When the user session starts, if the user is not a registered user, set a custom variable like so:
pageTracker._setCustomVar( 1, // This custom var is set to slot #1 "User Type", // The name of the custom varaible "Guest", // Sets the value of "User Type" to "Guest" for non registered users 2 // Sets the scope to session-level ); pageTracker._trackPageview();
- After the user logs in, use the following code.
pageTracker._setCustomVar( 1, "User Type", "Registered User", 2 ); pageTracker._trackPageview();
Now you should be able to see User Type
as a custom variable in your reports.
Hope this helps.
这篇关于使用 Google Analytics 跟踪两种不同的用户类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!