Activity Feedback

Activity feedback lets your users provide feedback about the content they're seeing.

When a user submits a feedback, a feeds.activity.feedback event is dispatched to the user who made the feedback.

Hide activity

Hide activity removes an activity for a given user from all feeds.

The hide takes effect after rereading the feed. The activity will be hidden from all feeds the user reads.

await _feedsV3Client.ActivityFeedbackAsync("activity_123", new ActivityFeedbackRequest
{
    Hide = true,
    UserID = "jane",
});
Info:

Since activity hide only affects the current user, it helps respect users' content preferences. If an activity contains harmful information, moderation should be used to mitigate the situation.

It's possible to undo an activity hide:

await _feedsV3Client.ActivityFeedbackAsync("activity_123", new ActivityFeedbackRequest
{
    Hide = false,
    UserID = "jane",
});

When an activity is hidden, activity.hidden flag will be set to true. Hidden activities won't be returned when reading feeds, but they can still be queried with the proper filters.

SDKs won't remove activities from the feed on feeds.activity.feedback event, but hidden flag will be updated.

When the foryou feed group has engagement analytics on, pass the request_id of the feed read that showed the activity, so the hide is counted for that feed view. An invalid or expired request_id doesn't fail the request: the hide is stored and only the count is skipped.

{ "hide": true, "request_id": "<request_id of the feed read>" }

Show more/less similar content

Stream's feeds API tracks a user's interest automatically based on the user's interactions. But users can also provide feedback requesting more or less content from different topics.

Info:

To use this functionality, you need to have ranking configured for your feeds. Show more/less feedback works by using only the interest_tags of the activity. When a user provides feedback, the system uses the activity's interest_tags to identify similar content and adjust the ranking accordingly. In the foryou feed group, activities whose interest_tags have strong negative feedback are filtered out of the feed. In all ranked feeds, activities are ranked according to the user's activity feedback when the ranking expression uses preference_score.

You can use preference_score in your ranking expressions to incorporate user preferences based on activity feedback. See Preference score for an example.

When a user requests to see more content similar to an activity, the feed algorithm will prioritize showing similar content in future feed reads.

await _feedsV3Client.ActivityFeedbackAsync("activity_123", new ActivityFeedbackRequest
{
    ShowMore = true,
    UserID = "jane",
});

Similarly, users can request to see less content similar to an activity:

await _feedsV3Client.ActivityFeedbackAsync("activity_123", new ActivityFeedbackRequest
{
    ShowLess = true,
    UserID = "jane",
});

It's possible to undo show more/less feedback by setting the value to false:

// Undo show more feedback
await _feedsV3Client.ActivityFeedbackAsync("activity_123", new ActivityFeedbackRequest
{
    ShowMore = false,
    UserID = "jane",
});

// Undo show less feedback
await _feedsV3Client.ActivityFeedbackAsync("activity_123", new ActivityFeedbackRequest
{
    ShowLess = false,
    UserID = "jane",
});

SDKs won't perform a state update on feeds.activity.feedback event. If you need a special UI for this action, you can subscribe to this event on the feed/client level with the on method.

Info:

The show more/less feedback affects the ranking and relevance of future activities in the user's feed. The changes take effect gradually as the feed algorithm learns from the user's preferences.

Negative feedback in For You ranking

Hides and show less feedback also count toward the activity itself: neg_feedback is the number of users who currently hide the activity or asked to see less of it. Each user counts once, and undoing the feedback lowers the count again. The For You ranking can use it to demote posts many users push away; the for_you_v2 preset does this from 3 users on.