字符串捕捉新的Andr​​oid Analytics(分析) [英] String capture with new Android Analytics

查看:131
本文介绍了字符串捕捉新的Andr​​oid Analytics(分析)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

林新的谷歌分析。我已经有建立一个帐户,我能捕捉到像浏览量基础数据。我希望看到在谷歌分析的东西是串在我的应用程序,人们寻找。这可能吗?

Im new to Google Analytics. I already have setup an account and I can capture basic data like pageviews. The thing I would like to see in google analytics is Strings that people search for in my app. Is this possible?

通过trackEvent,因为只需要整数作为最后一个参数,我不能做到这一点。 自定义瓦尔似乎是predefined。

I cannot do it through trackEvent since it only takes integer as last parameter. Custom vars seem to be predefined.

任何提示或指示,将AP preciated

Any hints or direction would be appreciated

推荐答案

我认为有两个基本的方法来跟踪搜索数据,事件或综合浏览量。

I think there are two basic ways to track search data, as events or pageviews.

首先,你可以把搜索词作为标签的事件,并使用整数重新present时代的条款已经被浏览最多的数(所以总是1从你的终点,而是GA可以汇聚它们)。像这样的:

First, you could put the search term as the "label" for the Event, and use the integer to represent the number of times the terms have been searched for (so always 1 from your end, but GA can aggregate them). Like this:

String searchTerms = "foo bar";
...
tracker.trackEvent("category", "search", searchTerms, 1);

第二个选择是将搜索字符串成一个综合浏览量的URL。像这样的:

A second option is to put the search strings into the URL of a pageViews. Like this:

String searchTerms = "foo bar";
...
tracker.trackPageView("/searches/" + searchTerms); // probably URL encode searchTerms?

或者,您可以使用URL查询语法(一个?)在URL(我不知道,如果GA将引发这些远离Android的URL或没有,所以你可能需要测试,看是否能获得通过):

Or, you could use URL query syntax (a "?") in the URL (I'm not sure if GA will throw these away from Android URLs or not, so you might want to test to see if this gets through):

String searchTerms = "foo bar";
...
tracker.trackPageView("/searches?terms=" + URLEncoder.encode(searchTerms, "UTF-8"));

我会建议尝试两个(三个方面)了,看到哪一个是在GA用户界面让你想看到的信息更加有用。

I'd suggest trying both (all three ways) out, and seeing which one is more useful in the GA UI for getting at the information you'd like to see.

这篇关于字符串捕捉新的Andr​​oid Analytics(分析)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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