0

I'm new to firebase and I recently integrated it to my project. I've logged few events using Analytics.logEvent("event_name", parameters: nil)

This seems to work and I can see data populating in my firebase account. Now I'm trying to get the few details based on individual user these are, exact location(right now it shows only country), session length and last screen of the session. Is it possible to retrieve these details in the free features of the firebase? If so, how do I proceed about it?

KENdi
  • 7,576
  • 2
  • 16
  • 31
Francis F
  • 3,157
  • 3
  • 41
  • 79

3 Answers3

2

This is against the Google's 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.

AniV
  • 3,997
  • 1
  • 12
  • 17
  • Ok, so, is it possible to get session length, time spent on each screen as an average? – Francis F Sep 26 '17 at 13:22
  • Yes, average data for almost all the actions performed by the app users is available by default with the Firebase automatically collected events. On top of that you can further log custom events. For time spend on each screen Firebase offers screen tracking functionality https://firebase.google.com/docs/analytics/screenviews – AniV Sep 26 '17 at 18:39
0

yes you can use screen tracking in (baseviewcontroller)viewdidappear. exapmle:

    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)

}
  • I'm using firebase analytics, it doesn't have google analytics. – Francis F Sep 26 '17 at 13:24
  • Firebase Analytics does have Screen Reporter automatically. You can do it yourself too https://firebase.google.com/docs/analytics/screenviews – adbitx Sep 27 '17 at 17:02
0

agree with policy, however, it is definitely supported by the API, just like it also was in Google Analytics SDK before.

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

However, I have not used it and I am not sure that Firebase Console allows the same level of drilling down to a single session of a single user as Google Analytics did ... but in Google Analytics is is definitely a very useful feature to drill down to individual user level!

christianmenkens
  • 790
  • 4
  • 22