trackImpression method

Future<void> trackImpression(
  1. Impression impression
)

Tracks the amount of times an Activity has been viewed, by which users, and more.

Check out the Impression object to view the full details of what gets tracked.

Example

A user is viewing a page:

 final analytics = AnalyticsClient(apiKey, secret: secret);
await analytics.trackImpression(
  Impression(
    contentList: [
      {"foreign_id": "tweet:34349698"}
    ],
    userData: UserData("test", "test"),
    feedId: FeedId("flat", "tommaso"),
    location: "profile_page",
  ),
);

Implementation

Future<void> trackImpression(Impression impression) =>
    trackImpressions([impression]);