我们使用一个Tracking_ID来跟踪Web,iOS,Android,但是iOS的“页面平均时间”是00:00:00,如何跟踪“页面平均时间”,我的代码如下:
class func trackForView(screenName: String) {
guard let tracker = GAI.sharedInstance().defaultTracker else { return }
tracker.set(kGAIScreenName, value: screenName)
tracker.set(kGAIPage, value: screenName)
guard let builder = GAIDictionaryBuilder.createScreenView() else { return }
tracker.send(builder.build() as [NSObject : AnyObject])
}