Google AnalyticsSDK在您的应用中 [英] Google Analytics SDK in your app

查看:134
本文介绍了Google AnalyticsSDK在您的应用中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照这里的说明操作:

https://developers.google.com/analytics/devguides/collection/android/v3/



我实施了分析.xml文件为:

 <资源> 
<! - 将占位符ID替换为您的跟踪ID - >
< string name =ga_trackingId> UA-XXXX-Y< / string>

<! - 启用自动活动追踪 - >
< bool name =ga_autoActivityTracking> true< / bool>

<! - 启用自动例外追踪 - >
< bool name =ga_reportUncaughtExceptions> true< / bool>
< /资源>

最后说重要提示:不要在ga_trackingId字符串中编码破折号,这样做会阻止你看不到你的报告中的任何数据。



这是否意味着我应该忽略破折号并放置类似UAXXXXY的东西?在其他所有例子中,我在网上看到过,人们使用破折号?请澄清

解决方案

不,这意味着您可以保持它的样子。

 < string name =ga_trackingId> UA-XXXX-Y< / string> 

提醒是因为Android Lint可能会提示您使用编码破折号而不是 - 。你可以简单地忽略它。


I followed the instructions here:

https://developers.google.com/analytics/devguides/collection/android/v3/

And I implemented the analytics.xml file as:

<resources>
 <!--Replace placeholder ID with your tracking ID-->
 <string name="ga_trackingId">UA-XXXX-Y</string>

 <!--Enable automatic activity tracking-->
 <bool name="ga_autoActivityTracking">true</bool>

 <!--Enable automatic exception tracking-->
 <bool name="ga_reportUncaughtExceptions">true</bool>
</resources>

In the end it says "Important: Do not encode dashes in the ga_trackingId string. Doing so will prevent you from seeing any data in your reports."

Does that mean I should leave out the dashes and put something like UAXXXXY? In all other examples, I saw online, people used dashes? Clarification please

解决方案

No, it means that you can just leave it be like it looks.

<string name="ga_trackingId">UA-XXXX-Y</string>

The reminder is because Android Lint may prompt you to use encoded dashes instead of "-". You can simply ignore it.

这篇关于Google AnalyticsSDK在您的应用中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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