GoogleAnalyticsService class
Requires LoggerService
- Implemented types
- Mixed-in types
-
- LoggerMixin
Properties
- currentScreen ↔ String
-
The current screen.
getter/setter pairoverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEnabled ↔ bool
-
The state of the service (if it reports to Google Analytics or not).
getter/setter pairoverride
- logger → LoggerService
-
Shortcut to access the Logger service.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setUserId(
String value) → void -
Google Analytics has a setUserID call, which allows you to store a user ID for the individual using your app.
This call is optional, and is generally used by organizations that want to use Analytics in conjunction with BigQuery to associate analytics data for the same user across multiple apps, multiple devices, or multiple analytics providers.
See https://firebase.google.com/docs/analytics/userid
override
-
setUserProperty(
String name, String value, {bool force = false}) → void -
User properties are attributes you define to describe segments of your user base, such as language preference or geographic location.
These can be used to define audiences for your app.
See https://firebase.google.com/docs/analytics/user-properties?platform=android
override
-
toString(
) → String -
A string representation of this object.
inherited
-
track(
String name, [Map< String, dynamic> ? params]) → Future -
Track an event.
@param name The name of the event.
@param params The optional parameters.
override
-
trackAction(
String name, String action) → void -
Track an action event.
@param name The name of the event.
@param action The name of the action.
override
-
trackActionAndValue(
String name, String action, Object value) → void -
Track an action-and-value event.
@param name The name of the event.
@param action The name of the action.
@param value The name of the value.
override
-
trackError(
String message, [Map< String, dynamic> ? params]) → Future -
Track an error.
@param message The error message.
@param params The optional parameters.
override
-
trackErrorWithException(
String source, dynamic e, dynamic stackTrace) → Future -
Track an error with an exception.
@param source The source of the error.
@param stackTrace The stack trace.
override
-
trackValue(
String name, Object value) → void -
Track a value event.
@param name The name of the event.
@param value The name of the value.
override
-
trackWarning(
String message, [Map< String, dynamic> ? params]) → Future -
Track a warning.
@param message The warning message.
@param params The optional parameters.
override
-
trackWarningWithException(
String source, dynamic e, dynamic stackTrace) → Future -
Track a warning with an exception.
@param source The source of the warning.
@param stackTrace The stack trace.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
bool startEnabled) → Future< IGoogleAnalyticsService> -
Requires
LoggerService@param startEnabled The state the service should start with. -
createMockable(
FirebaseAnalyticsWeb firebaseAnalytics, bool startEnabled) → Future< IGoogleAnalyticsService> -
Requires
LoggerServiceFor testing purposes only.
Constants
- EVENT_NAME__TUTORIAL_BEGIN → const String
- EVENT_NAME__TUTORIAL_COMPLETE → const String
- MAX_EVENT_NAME_LENGTH → const int
- MAX_PARAM_NAME_LENGTH → const int
- MAX_PARAM_VALUE_LENGTH → const int