测试Google Analytics iOS SDK [英] Testing Google Analytics iOS SDK

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

问题描述

有没有人找到在iOS上测试Google Analytics的好方法? SDK非常简单,但文档不讨论如何测试或验证。



库在模拟器上的行为或运行调试构建配置时的行为不同吗?



我用这个委托方法设置一个委托GANTrackerDelegate:

   - (void )trackerDispatchDidComplete:(GANTracker *)tracker 
eventsDispatched:(NSUInteger)eventsDispatched
eventsFailedDispatch:(NSUInteger)eventsFailedDispatch;

这个方法被调用的很好,我在eventsDispatched和eventsFailedDispatch中看到了正值。那么有没有一种方法可以测试这些事件是否正确接收,并与我认为正在提交的内容相关联?



我想我需要设置一个专用GA网站配置文件进行测试。运行一组固定的UI自动化单元测试,然后等待24小时,以便手动可用数据并进行验证。 Ick。

解决方案

现在使用实时分析更容易,您可以实时看到访问,并且可以在模拟器上工作:



https://www.google .com / analytics / web /#realtime

Has anyone found a good way to test Google Analytics on iOS? The SDK is really simple but the docs do not discuss how to test or validate.

Does the library behave differently on the simulator or when running a debug build config?

I setup a delegate GANTrackerDelegate with this delegate method:

- (void)trackerDispatchDidComplete:(GANTracker *)tracker
                  eventsDispatched:(NSUInteger)eventsDispatched
              eventsFailedDispatch:(NSUInteger)eventsFailedDispatch;

That method gets called just fine and I see positive values in eventsDispatched and eventsFailedDispatch has always been 0. Beyond that is there a way I can test that those events are being received correctly and correlate with what I think I'm submitting?

I'm thinking I need to setup a dedicated GA Website profile for test. Run a fixed set of UI automation unit tests and then wait 24 hours for that data to be available and validate "by hand". Ick.

解决方案

Now it's a lot easier with realtime analytics, you see the visit in realtime, and it's working on the simulator :

https://www.google.com/analytics/web/#realtime

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

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