SupabaseAnalyticsAddons class

Implements analytics in Supabase. The analytics addons

Creating the analytics table:

create table public.analytics (
  name text not null,
  params json,
  user_id text,
  timestamp text
);

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

isInitialized → bool
Check if the analytics addon is initialized.
no setter
tableName → String
The table name used by the Analytics Addon. The default table name is analytics
no setter
userCountry ↔ String?
The user country code.
getter/setter pair

Static Methods

dispose() → void
Dispose the addon to free up resources.
initialize({String tableName = 'analytics', bool useLoggedUserInfo = true, bool logUserSignIn = true, String? userCountry}) → void
Initialize the analytics addons
logAdImpression({String? provider, String? format}) → Future<void>
This event signifies when a user sees an ad impression
logEvent({required String name, Map<String, dynamic>? params, String? userId}) → Future<void>
Log an event.
logPurchase({String? affiliation, String? coupon, String? currency, List<String> items = const [], double? shipping, double? tax, String? transactionId, double? value}) → Future<void>
E-Commerce Purchase event. This event signifies that an item(s) was purchased by a user.
logRefund({String? affiliation, String? coupon, String? currency, List<String> items = const [], double? shipping, double? tax, String? transactionId, double? value}) → Future<void>
E-Commerce Refund event. This event signifies that a refund was issued
logScreenView({String? screenClass, String? screenName}) → Future<void>
Screen View event. This event signifies a screen view. Use this when a screen transition occurs.
logSearch({required String term, Map<String, dynamic>? params}) → Future<void>
Search event
logSelectItem({required String item}) → Future<void>
Select Item event. This event signifies that an item was selected by a user from a list. Use the appropriate parameters to contextualize the event. Use this event to discover the most popular items selected.
logUserSession() → Future<void>
Log when a user signs in the app.