如何跟踪与谷歌分析用户preferences为Android? [英] How to track user preferences with Google Analytics for Android?

查看:135
本文介绍了如何跟踪与谷歌分析用户preferences为Android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解什么样的$ P $的pferences我的用户在我的应用程序。
我在想是这样的:

I would like to understand what kind of Preferences my users have in my application. I was thinking about something like:

EasyTracker easyTracker = EasyTracker.getInstance(context);
easyTracker.send(MapBuilder
        .createEvent("user",
                "prefs",
                "data",
                (long) data)
                .build()
        );

然后传递数据,如:

And then pass the data like:

if (user_name != "") { data += 1; }
if (user_address != "") { data += 10; }
if (user_phone != "") { data += 100; }

不过,我将能够跟踪然后前,有多少用户有空 user_address

推荐答案

我觉得有两个这种类型的数据,更好的选择。

I think there are 2 better options for this type of data.


  1. 您应用程序的数据库。 SQL select语句可以给你计数和特定的值了。不需要跟踪在附加位置。例如:

  1. Your applications database. SQL select statements can give you counts and specific values already. No need to track in an additional place. Example:

选择SUM(IF(user_name是空,0,1))作为num_Users_With_UserName
从用户
GROUP BY如果(user_name是空,0,1)

select sum(if(user_name is null,0,1)) as num_Users_With_UserName from users group by if(user_name is null,0,1)

如果你只有这3个preferences跟踪,你想看到他们在GA不管是什么原因,我建议自定义变量或自定义尺寸(取决于你使用的是什么版本的GA)没有事件。这些可以与用户的范围,你可以跟踪用户的变化,但保持他们的preference的状态,整个访问进行设置。活动是最好的跟踪点击和用户变量是在自定义变量或自定义尺寸最好跟踪。 (您可能需要为用户名是自定义维度和当用户名字段例如改变状态的事件结合起来。)

If you only have these 3 preferences to track and you want to see them in GA for whatever reason I recommend custom variables or custom dimensions (depending on what version of GA you're using) not events. These can be set with a user scope you can track changes for a user but keep the state of their preference across visits. Events are best for tracking clicks and user variables are best tracked in custom variables or custom dimensions. (You may want to combine a custom dimension for 'Has Username' and an event for when the Username field changes state for example.)

这篇关于如何跟踪与谷歌分析用户preferences为Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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