【发布时间】:2016-07-21 09:26:24
【问题描述】:
我已经在我的项目中使用 cocoapods 成功集成了 Google Analytics iOS SDK(使用 Swift 语言)。
- 添加了 Cocoapods (
pod 'Google/Analytics') - 生成 GoogleService-Info.plist 文件并将其添加到项目和最后一步
- 在 AppDelegate.swift 中初始化 Google Analytics
var configureError:NSError? GGLContext.sharedInstance().configureWithError(&configureError) assert(configureError == nil, "配置 Google 服务时出错: (配置错误)")
- 在 viewdidappear 中添加了屏幕视图代码
最终在模拟器或设备上运行应用程序后,日志显示如下
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
请帮忙。
【问题讨论】:
标签: ios swift google-analytics