trackEngagement method

Future<void> trackEngagement(
  1. Engagement engagement
)

Tracks the interactions users have had with an Activity.

Check out the Engagement class for the full details of what gets tracked.

Example

A user is interacting with a content item:

final analytics = AnalyticsClient(apiKey, userToken: token);
await analytics.trackEngagement(
  Engagement(
    content: {"foreign_id": "tweet:34349698"},
    label: "click",
    userData: UserData("test", "test"),
    feedId: FeedId("user", "thierry"),
  ),
);

Implementation

Future<void> trackEngagement(Engagement engagement) =>
    trackEngagements([engagement]);