StreamAnalytics class

Sends out analytic events to the Stream service. We recommend tracking every event for each user. This allows you to gain a better understanding of that user's interests. Common examples include:

  • Clicking on a link
  • Liking or commenting
  • Sharing an activity
  • Viewing another user's profile page
  • Searching for a certain user/content/topic/etc.
Inheritance

Constructors

StreamAnalytics(String apiKey, {String? secret, Token? userToken, AnalyticsAPI? analytics, StreamHttpClientOptions? options})
StreamAnalytics constructor:

Properties

hashCode int
The hash code for this object.
read-onlyinherited
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
read-onlyoverride
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
secret String?
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
read-onlyinherited
userData UserData?
Data related to the user
read / write
userToken Token?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setUser({required String id, required String alias}) → void
Set user id and alias
toString() String
A string representation of this object.
inherited
trackEngagement(Engagement engagement) Future<void>
Tracks the interactions users have had with an Activity.
trackEngagements(List<Engagement> engagements) Future<void>
Send Engagement event
trackImpression(Impression impression) Future<void>
Tracks the amount of times an Activity has been viewed, by which users, and more.
trackImpressions(List<Impression> impressions) Future<void>
Send Impression events

Operators

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