Engagements

Tracking Engagements

The snippet below shows an example of how to track engagements. Engagement examples include likes, comments, profile views and link clicks.

StreamEngagement *event = [StreamEngagement createEngagementEvent:@"click" withContent: @{@"foreign_id":@"message:34349698"}.mutableCopy]];

event.position = @"3";
event.boost = @2;
event.feedId = @"user:thierry";
event.location = @"profile_page";

[[StreamAnalytics sharedInstance] send:event];

Parameters

nametypedescriptiondefaultoptional
labelstringThe type of event (i.e. click, share, search, etc.)-
contentstring or objectThe content the engagement related to, either as an ID or content object.-
scorestringA score between 0 and 100 indicating the importance of an event.-
positionstringThe placement in a list of activities, starting at 0.-
feed_idstringThe specific feed the user is viewing-
locationstringThe page in your app (i.e. email, homepage, profile page, etc.)-
© Getstream.io, Inc. All Rights Reserved.