谷歌分析Swift -不显示更新的仪表板报告

时间:2021-12-26 14:34:29

I've successfully integrated the Google Analytics iOS SDK using cocoapods in my project (Using Swift Language).

我已经在我的项目(使用Swift语言)中使用cocoapods成功集成了谷歌Analytics iOS SDK。

  1. Added Cocoapods (pod 'Google/Analytics')
  2. 添加Cocoapods(pod谷歌/分析)
  3. Generated GoogleService-Info.plist file and added the same to project and final step
  4. GoogleService-Info生成。plist文件,并添加相同的项目和最终步骤
  5. Initialize the Google Analytics in the AppDelegate.swift
  6. 在AppDelegate.swift中初始化谷歌分析

var configureError:NSError? GGLContext.sharedInstance().configureWithError(&configureError) assert(configureError == nil, "Error configuring Google services: (configureError)")

var configureError:NSError ?sharedinstance ().configure rewitherror (&configure reerror) assert(configureError == nil,“配置谷歌services: (configureError)”)

  1. Added screen view code in viewdidappear
  2. 在viewdidappear中添加了屏幕视图代码

Finally after running the app on the simulator or device, the logs shows the following

最后,在模拟器或设备上运行app后,日志显示如下内容

3.14 -[GAIBatchingDispatcher didSendHits:response:data:error:] (GAIBatchingDispatcher.m:226): Hit(s) dispatched: HTTP status -1 2016-07-21 13:05:25.265 HelloWorld[4264:206213] INFO: GoogleAnalytics 3.14 -[GAIBatchingDispatcher deleteHits:] (GAIBatchingDispatcher.m:529): hit(s) Successfully deleted 2016-07-21 13:05:25.266 HelloWorld[4264:206213] INFO: GoogleAnalytics 3.14 -[GAIBatchingDispatcher didSendHits:] (GAIBatchingDispatcher.m:237): 1 hit(s) sent

[GAIBatchingDispatcher]:发送者:HTTP:状态:- 07-07-21 13:05:27 . HelloWorld[4264:206213

But the same is not reflecting in the Dashboard (Google Analytics)? https://analytics.google.com/analytics/web

但同样的情况也没有反映在仪表板上(谷歌分析)?https://analytics.google.com/analytics/web

Please help.

请帮助。

1 个解决方案

#1


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.

尝试查看实时部分,并添加一些事件点击按钮,以便能够发送报告当你想要进行测试时,你确定你添加它作为一个移动应用吗?如果它像web一样工作,它就会有长时间的延迟报告。

#1


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.

尝试查看实时部分,并添加一些事件点击按钮,以便能够发送报告当你想要进行测试时,你确定你添加它作为一个移动应用吗?如果它像web一样工作,它就会有长时间的延迟报告。