FacebookAppEvents class

Constructors

FacebookAppEvents()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearUserData() Future<void>
Clears the current user data
clearUserID() Future<void>
Clears the currently set user id.
flush() Future<void>
Explicitly flush any stored events to the server.
getAnonymousId() Future<String?>
getApplicationId() Future<String?>
Returns the app ID this logger was configured to log to.
logAdClick({required String adType}) Future<void>
Log this event when the user clicks an ad.
logAddToCart({Map<String, dynamic>? content, required String id, required String type, required String currency, required double price}) Future<void>
Log this event when the user has added item to cart
logAddToWishlist({Map<String, dynamic>? content, required String id, required String type, required String currency, required double price}) Future<void>
Log this event when the user has added item to cart
logAdImpression({required String adType}) Future<void>
Log this event when the user views an ad.
logCompletedRegistration({String? registrationMethod}) Future<void>
Log this event when the user has completed registration with the app. Parameter registrationMethod is used to specify the method the user has used to register for the app, e.g. "Facebook", "email", "Google", etc. See: https://developers.facebook.com/docs/reference/androidsdk/current/facebook/com/facebook/appevents/appeventsconstants.html/#eventnamecompletedregistration
logEvent({required String name, Map<String, dynamic>? parameters, double? valueToSum}) Future<void>
Log an app event with the specified name and the supplied parameters value.
logInitiatedCheckout({double? totalPrice, String? currency, String? contentType, String? contentId, int? numItems, bool paymentInfoAvailable = false}) Future<void>
logPurchase({required double amount, required String currency, Map<String, dynamic>? parameters}) Future<void>
logPushNotificationOpen({required Map<String, dynamic> payload, String? action}) Future<void>
Logs an app event that tracks that the application was open via Push Notification.
logRated({double? valueToSum}) Future<void>
Log this event when the user has rated an item in the app.
logStartTrial({double? price, String? currency, required String orderId}) Future<void>
The start of a free trial of a product or service you offer (example: trial subscription). See:
logSubscribe({double? price, String? currency, required String orderId}) Future<void>
The start of a paid subscription for a product or service you offer. See:
logViewContent({Map<String, dynamic>? content, String? id, String? type, String? currency, double? price}) Future<void>
Log this event when the user has viewed a form of content in the app.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAdvertiserTracking({required bool enabled, bool collectId = true}) Future<void>
Sets the Advert Tracking propeety for iOS advert tracking an iOS 14+ feature, android should just return a success.
setAutoLogAppEventsEnabled(bool enabled) Future<void>
Re-enables auto logging of app events after user consent if disabled for GDPR-compliance.
setDataProcessingOptions(List<String> options, {int? country, int? state}) Future<void>
Set Data Processing Options This is needed for California Consumer Privacy Act (CCPA) compliance
setUserData({String? email, String? firstName, String? lastName, String? phone, String? dateOfBirth, String? gender, String? city, String? state, String? zip, String? country}) Future<void>
Sets user data to associate with all app events. All user data are hashed and used to match Facebook user from this instance of an application. The user data will be persisted between application instances.
setUserID(String id) Future<void>
Sets a user id to associate with all app events. This can be used to associate your own user id with the app events logged from this instance of an application. The user ID will be persisted between application instances.
toString() String
A string representation of this object.
inherited

Operators

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

Constants

eventNameAdClick → const String
eventNameAddedToCart → const String
eventNameAddedToWishlist → const String
eventNameAdImpression → const String
eventNameCompletedRegistration → const String
eventNameInitiatedCheckout → const String
eventNameRated → const String
eventNameStartTrial → const String
eventNameSubscribe → const String
eventNameViewedContent → const String
paramNameAdType → const String
paramNameContent → const String
Parameter key used to specify data for the one or more pieces of content being logged about. Data should be a JSON encoded string. Example: "{\"id\": \"1234\", \"quantity\": 2, \"item_price\": 5.99}, {\"id\": \"5678\", \"quantity\": 1, \"item_price\": 9.99}"
paramNameContentId → const String
Parameter key used to specify an ID for the specific piece of content being logged about. This could be an EAN, article identifier, etc., depending on the nature of the app.
paramNameContentType → const String
Parameter key used to specify a generic content type/family for the logged event, e.g. "music", "photo", "video". Options to use will vary depending on the nature of the app.
paramNameCurrency → const String
paramNameNumItems → const String
paramNameOrderId → const String
paramNamePaymentInfoAvailable → const String
paramNameRegistrationMethod → const String
paramValueNo → const String
paramValueYes → const String