FirebaseAnalytics class

Firebase Analytics API.

Constructors

FirebaseAnalytics()

Properties

android FirebaseAnalyticsAndroid?
Namespace for analytics API available on Android only.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

logAddPaymentInfo() Future<void>
Logs the standard add_payment_info event.
logAddToCart({required String itemId, required String itemName, required String itemCategory, required int quantity, double? price, double? value, String? currency, String? origin, String? itemLocationId, String? destination, String? startDate, String? endDate}) Future<void>
Logs the standard add_to_cart event.
logAddToWishlist({required String itemId, required String itemName, required String itemCategory, required int quantity, double? price, double? value, String? currency, String? itemLocationId}) Future<void>
Logs the standard add_to_wishlist event.
logAppOpen() Future<void>
Logs the standard app_open event.
logBeginCheckout({double? value, String? currency, String? transactionId, int? numberOfNights, int? numberOfRooms, int? numberOfPassengers, String? origin, String? destination, String? startDate, String? endDate, String? travelClass}) Future<void>
Logs the standard begin_checkout event.
logCampaignDetails({required String source, required String medium, required String campaign, String? term, String? content, String? aclid, String? cp1}) Future<void>
Logs the standard campaign_details event.
logEarnVirtualCurrency({required String virtualCurrencyName, required num value}) Future<void>
Logs the standard earn_virtual_currency event.
logEcommercePurchase({String? currency, double? value, String? transactionId, double? tax, double? shipping, String? coupon, String? location, int? numberOfNights, int? numberOfRooms, int? numberOfPassengers, String? origin, String? destination, String? startDate, String? endDate, String? travelClass}) Future<void>
Logs the standard ecommerce_purchase event.
logEvent({required String name, Map<String, Object?>? parameters}) Future<void>
Logs a custom Flutter Analytics event with the given name and event parameters.
logGenerateLead({String? currency, double? value}) Future<void>
Logs the standard generate_lead event.
logJoinGroup({required String groupId}) Future<void>
Logs the standard join_group event.
logLevelEnd({required String levelName, int? success}) Future<void>
Logs the standard level_end event.
logLevelStart({required String levelName}) Future<void>
Logs the standard level_start event.
logLevelUp({required int level, String? character}) Future<void>
Logs the standard level_up event.
logLogin({String? loginMethod}) Future<void>
Logs the standard login event.
logPostScore({required int score, int? level, String? character}) Future<void>
Logs the standard post_score event.
logPresentOffer({required String itemId, required String itemName, required String itemCategory, required int quantity, double? price, double? value, String? currency, String? itemLocationId}) Future<void>
Logs the standard present_offer event.
logPurchaseRefund({String? currency, double? value, String? transactionId}) Future<void>
Logs the standard purchase_refund event.
logRemoveFromCart({required String itemId, required String itemName, required String itemCategory, required int quantity, double? price, double? value, String? currency, String? origin, String? itemLocationId, String? destination, String? startDate, String? endDate}) Future<void>
Logs the standard remove_from_cart event. See: https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event.html#REMOVE_FROM_CART
logSearch({required String searchTerm, int? numberOfNights, int? numberOfRooms, int? numberOfPassengers, String? origin, String? destination, String? startDate, String? endDate, String? travelClass}) Future<void>
Logs the standard search event.
logSelectContent({required String contentType, required String itemId}) Future<void>
Logs the standard select_content event.
logSetCheckoutOption({required int checkoutStep, required String checkoutOption}) Future<void>
Logs the standard set_checkout_option event. See: https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event.html#SET_CHECKOUT_OPTION
logShare({required String contentType, required String itemId, required String method}) Future<void>
Logs the standard share event.
logSignUp({required String signUpMethod}) Future<void>
Logs the standard sign_up event.
logSpendVirtualCurrency({required String itemName, required String virtualCurrencyName, required num value}) Future<void>
Logs the standard spend_virtual_currency event.
logTutorialBegin() Future<void>
Logs the standard tutorial_begin event.
logTutorialComplete() Future<void>
Logs the standard tutorial_complete event.
logUnlockAchievement({required String id}) Future<void>
Logs the standard unlock_achievement event with a given achievement id.
logViewItem({required String itemId, required String itemName, required String itemCategory, String? itemLocationId, double? price, int? quantity, String? currency, double? value, String? flightNumber, int? numberOfPassengers, int? numberOfNights, int? numberOfRooms, String? origin, String? destination, String? startDate, String? endDate, String? searchTerm, String? travelClass}) Future<void>
Logs the standard view_item event.
logViewItemList({required String itemCategory}) Future<void>
Logs the standard view_item_list event.
logViewSearchResults({required String searchTerm}) Future<void>
Logs the standard view_search_results event.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetAnalyticsData() Future<void>
Clears all analytics data for this app from the device and resets the app instance id.
setAnalyticsCollectionEnabled(bool enabled) Future<void>
Sets whether analytics collection is enabled for this app on this device.
setCurrentScreen({required String? screenName, String screenClassOverride = 'Flutter'}) Future<void>
Sets the current screenName, which specifies the current visual context in your app.
setUserId(String? id) Future<void>
Sets the user ID property.
setUserProperty({required String name, required String? value}) Future<void>
Sets a user property to a given value.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited