# 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.

```go label="Go"
feedsClient := client.Feeds()
_, err := feedsClient.ActivityFeedback(context.Background(), "activity_123", &getstream.ActivityFeedbackRequest{
    Hide:  getstream.PtrTo(true),
    UserID: getstream.PtrTo("jane"),
})
if err != nil {
    log.Fatal("Error providing activity feedback:", err)
}
```

>
> **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:

```go label="Go"
feedsClient := client.Feeds()
_, err := feedsClient.ActivityFeedback(context.Background(), "activity_123", &getstream.ActivityFeedbackRequest{
    Hide:  getstream.PtrTo(false),
    UserID: getstream.PtrTo("jane"),
})
if err != nil {
    log.Fatal("Error providing activity feedback:", err)
}
```

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.

## 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](https://getstream.io/activity-feeds/docs/node/interest-ranking/#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.

```go label="Go"
feedsClient := client.Feeds()
_, err := feedsClient.ActivityFeedback(context.Background(), "activity_123", &getstream.ActivityFeedbackRequest{
    ShowMore: getstream.PtrTo(true),
    UserID:    getstream.PtrTo("jane"),
})
if err != nil {
    log.Fatal("Error providing activity feedback:", err)
}
```

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

```go label="Go"
feedsClient := client.Feeds()
_, err := feedsClient.ActivityFeedback(context.Background(), "activity_123", &getstream.ActivityFeedbackRequest{
    ShowLess: getstream.PtrTo(true),
    UserID:    getstream.PtrTo("jane"),
})
if err != nil {
    log.Fatal("Error providing activity feedback:", err)
}
```

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

```go label="Go"
feedsClient := client.Feeds()

// Undo show more feedback
_, err := feedsClient.ActivityFeedback(context.Background(), "activity_123", &getstream.ActivityFeedbackRequest{
    ShowMore: getstream.PtrTo(false),
    UserID:    getstream.PtrTo("jane"),
})
if err != nil {
    log.Fatal("Error providing activity feedback:", err)
}

// Undo show less feedback
_, err = feedsClient.ActivityFeedback(context.Background(), "activity_123", &getstream.ActivityFeedbackRequest{
    ShowLess: getstream.PtrTo(false),
    UserID:    getstream.PtrTo("jane"),
})
if err != nil {
    log.Fatal("Error providing activity feedback:", err)
}
```

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.
>

---

For the most recent version of this documentation, visit [https://getstream.io/activity-feeds/docs/go-golang/activity-feedback/](https://getstream.io/activity-feeds/docs/go-golang/activity-feedback/).