在 firebase 中获取个人用户详细信息

Get individual user details in firebase

我是 firebase 的新手,我最近将它集成到我的项目中。我使用 Analytics.logEvent("event_name", parameters: nil)

记录了一些事件

这似乎有效,我可以看到数据填充到我的 firebase 帐户中。现在我正在尝试根据个人用户获取一些详细信息,具体位置(现在它只显示国家/地区)、会话长度和会话的最后一个屏幕。是否可以在 firebase 的免费功能中检索这些详细信息?如果是这样,我该如何处理?

是的,您可以在 (baseviewcontroller)viewdidappear 中使用屏幕跟踪。 例如:

    override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated);
    // Google Analytics
    let className = String(describing: type(of: self))
    let tracker = GAI.sharedInstance().defaultTracker
    tracker!.set(kGAIScreenName, value: className)
    let build = (GAIDictionaryBuilder.createScreenView().build() as NSDictionary) as! [AnyHashable: Any]
    tracker?.send(build)

}

这与 Google 的 Privacy policy 相悖。

You will not, and will not assist or permit any third party to, pass information to Google that Google could use or recognize as personally identifiable information. You will have and abide by an appropriate Privacy Policy and will comply with all applicable laws, policies, and regulations relating to the collection, usage and sharing of information from Users. You must post a Privacy Policy and that Privacy Policy must provide notice of Your use of cookies, identifiers for mobile devices (e.g., Android Advertising Identifier or Advertising Identifier for iOS) or similar technology that are used to collect data. You must disclose the use of the Service, and how it collects and processes data.

同意政策,但是,API 绝对支持它,就像之前在 Google Analytics SDK 中一样。

https://firebase.google.com/docs/reference/ios/firebaseanalytics/api/reference/Classes/FIRAnalytics#setuserid

但是,我没有使用过它,我不确定 Firebase 控制台是否允许与 Google Analytics 进行的相同级别的向下钻取到单个用户的单个会话...但是在 Google 分析绝对是一个非常有用的功能,可以深入到个人用户级别!