我正在尝试在ios中实现Google Analytics(分析),日志显示已发送数据,但Google Analytics(分析)控制台中未显示任何内容

代码登录屏幕

override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)

        guard let tracker = GAI.sharedInstance().defaultTracker else { return }
        tracker.set("login screen", value: "loginname")

        guard let builder = GAIDictionaryBuilder.createScreenView() else { return }
        tracker.send(builder.build() as [NSObject : AnyObject])

    }


应用程序委托fe didFinishLaunchingWithOptions

guard let gai = GAI.sharedInstance() else {
            assert(false, "Google Analytics not configured correctly")
        }


        gai.tracker(withTrackingId: "UA-*********-1")
        GAI.sharedInstance().defaultTracker = gai.tracker(withTrackingId: "UA-**********-1")
        // Optional: automatically report uncaught exceptions.
        gai.trackUncaughtExceptions = true

        // Optional: set Logger to VERBOSE for debug information.
        // Remove before app release.
        gai.logger.logLevel = .verbose;


荚文件

pod 'GoogleAnalytics'


日志
ios - 谷歌分析不显示iOS数据-LMLPHP

最佳答案

数据存在延迟。尝试等待24小时。什么在“实时”数据中显示?

10-02 09:35