Google Analytics iOS SDK - 多个帐户 [英] Google Analytics iOS SDK - Multiple accounts

查看:108
本文介绍了Google Analytics iOS SDK - 多个帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让我的视图控制器在我的iPhone应用程序上由两个不同的帐户进行跟踪。我目前正在使用SDK的1.5.1版本,它不支持此功能。在版本2的文档中,它表示它支持多个追踪器,但我无法弄清楚两种追踪相同视图的方法。有人知道我该怎么做?



谢谢!

解决方案


$ b

截至版本2 SDK 的详细解释,您可以使用多个跟踪器在单个实施中,每个唯一的跟踪ID一个。所有的追踪器都与您的GAI单例拥有相同的全局状态,包括周期性调度时间间隔,应用程序级别退出和调试模式等设置。请记住,自动屏幕跟踪和未捕获的异常跟踪将只使用一个跟踪器进行跟踪调用。如果您正在使用这些功能,并希望将类似数据发送给其他跟踪器,则需要手动执行。



作为参考,自动屏幕跟踪使用指定的跟踪器给定 GAITrackedViewController 的跟踪器属性。未捕获的异常跟踪使用在您的 GAI 实例中指定的默认跟踪器。

这里的详细代码&关于相同的文件,你应该查看这个



我相信这会帮助你... !!!


I am trying to make my view controllers be tracked by two different accounts on my iPhone app. I am currently using the version 1.5.1 of the SDK, which doesn't support this functionality. On the documentation of the version 2, it says that it supports multiple trackers, but I couldn't figure out a way to make both track the same view. Does anyone know how can I do that?

Thanks!

解决方案

here is the detailed explaination for the same

As of version 2 of the SDK, you can use multiple trackers in a single implementation, one per unique tracking ID. All trackers share the same global state held by your GAI singleton,including settings like periodic dispatch interval, app-level opt out, and debug mode.

Keep in mind that automatic screen tracking and uncaught exception tracking will only use one tracker to make tracking calls. If you are using these features and want to send similar data to other trackers, you will need to do so manually.

For reference, automatic screen tracking uses the tracker specified in the tracker property of a given GAITrackedViewController. Uncaught exception tracking uses the default tracker specified in your GAI instance.

Here the detailed code & documenation about the same,you should view this

I am sure this'll help you...!!!

这篇关于Google Analytics iOS SDK - 多个帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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