-
Notifications
You must be signed in to change notification settings - Fork 16
H.3 Log Events
Events provide insight on what is happening in your app, such as user actions, system events, or errors.
Analytics automatically logs some events for you; you don't need to add any code to receive them. If your app needs to collect additional data, you can log up to 500 different Analytics Event types in your app. There is no limit on the total volume of events your app logs. Note that event names are case-sensitive and that logging two events whose names differ only in case will result in two distinct events.
After you have initialized the FirebaseAnalytics, you can use it to log events with the logEvent() method.
To help you get started, the Analytics SDK defines a number of suggested events that are common among different types of apps, including retail and ecommerce, travel, and gaming apps. To learn more about these events and when to use them, browse the Events and properties articles in the Firebase Help Center.
Note: To get the maximum detail in reports, log the suggested events that make sense for your app and their prescribed parameters. This also ensures that you benefit from the latest Firebase Analytics features as they become available.
You can find implementation details for suggested event types in the following locations:
- Suggested events: see the AnalyticsEvent class reference.
- Prescribed parameters: see the AnalyticsParam class reference.
The following example demonstrates how to log a suggested SELECT_CONTENT Event:
var bundle:AnalyticsParam = new AnalyticsParam();
bundle.addString(AnalyticsParam.ITEM_ID, "yourContentId");
bundle.addString(AnalyticsParam.ITEM_NAME, "yourContentName");
bundle.addString(AnalyticsParam.CONTENT_TYPE, "image");
FirebaseAnalytics.logEvent(AnalyticsEvent.SELECT_CONTENT, bundle);
In addition to the prescribed parameters, you can add the following parameters to any event:
-
Custom parameters: Custom parameters are not represented directly in your Analytics reports, but they can be used as filters in audience definitions that can be applied to every report. Custom parameters are also included in data exported to BigQuery if your app is linked to a BigQuery project.
-
VALUE
parameter: VALUE is a general purpose parameter that is useful for accumulating a key metric that pertains to an event. Examples include revenue, distance, time, and points.
If your application has specific needs not covered by a suggested event type, you can log your own custom events.
On Android you can enable verbose logging to monitor logging of events by the SDK to help verify that events are being logged properly. This includes both automatically and manually logged events.
You can enable verbose logging with a series of adb commands:
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat -v time -s FA FA-SVC
This command displays your events in the Android Studio logcat, helping you immediately verify that events are being sent.
Enjoy building Air apps – With ♥ from MyFlashLabs Team
Introduction to Firebase ANEs collection for Adobe Air apps
Get Started with Firebase Core in AIR
- Prerequisites
- Add Firebase to your app
- Add the Firebase SDK
- Init Firebase Core
- Available ANEs
- Managing Firebase iid
Get Started with Authentication
- Add Authentication
- Init Authentication
- Manage Users
- Phone Number
- Custom Auth
- Anonymous Auth
- State in Email Actions
- Email Link Authentication
Get Started with FCM + OneSignal
- Add FCM ANE
- Init FCM ANE
- Send Your 1st Message
- Send Msg to Topics
- Understanding FCM Messages
- init OneSignal
- Add Firestore
- Init Firestore
- Add Data
- Transactions & Batches
- Delete Data
- Manage the Console
- Get Data
- Get Realtime Updates
- Simple and Compound
- Order and Limit Data
- Paginate Data
- Manage Indexes
- Secure Data
- Offline Data
- Where to Go From Here
Get Started with Realtime Database
- Add Realtime Database
- Init Realtime Database
- Structure Your Database
- Save Data
- Retrieve Data
- Enable Offline Capabilities
Get Started with Remote Config
- Add Storage ANE
- Init Storage ANE
- Upload Files to Storage
- Download Files to Air
- Use File Metadata
- Delete Files