我已经在我的项目中使用cocoapods成功集成了Google Analytics iOS SDK(使用Swift语言)。
pod 'Google/Analytics'
)var configureError:NSError? 。GGLContext.sharedInstance()configureWithError(安培; configureError) assert(configureError == nil,“配置Google服务时出错: (configureError)“)
最后,在模拟器或设备上运行应用程序后,日志显示以下内容
3.14 - [GAIBatchingDispatcher didSendHits:response:data:error:](GAIBatchingDispatcher.m:226):已调度命中:HTTP状态-1 2016-07-21 13:05:25.265 HelloWorld [4264:206213]信息:GoogleAnalytics 3.14 - [GAIBatchingDispatcher deleteHits:](GAIBatchingDispatcher.m:529):hit(s)已成功删除2016-07-21 13:05:25.266 HelloWorld [4264:206213]信息:GoogleAnalytics 3.14 - [GAIBatchingDispatcher didSendHits:](GAIBatchingDispatcher.m:237):1次点击发送
但是在仪表板(Google Analytics)中没有反映出来的情况? https://analytics.google.com/analytics/web
请帮忙。
答案 0 :(得分:1)
Try to check in real time section, and add some event on clicking button to be able to send report when you want for tests Are you sure that you add it as an mobile app? If it is working as web it has long delay in report.