简体   繁体   中英

Is this the right code for tracking a button in a an app for Firebase

I'm new to Firebase SDK, I have to create a custom event for downloading content and I can someone explain to me how I would go about changing the code to track the downloads?

Analytics.logEvent(AnalyticsEventSelectContent, parameters: [
  AnalyticsParameterItemID: "id-\title!",
  AnalyticsParameterItemName: "title",
  AnalyticsParameterContentType: "cont",
])

You could consider using the automatically collected event in Analytics called 'first_open' which is triggered when the user launches the app for the first time after installing or reinstalling it. You could check out this page to know more about automatically collected events in Firebase.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM