feat(issues): Add engaged view tracking#107912
Merged
Conversation
These events will be fired for issue details views where a user has spent >10s on the page before bouncing.
Read organization from context inside the engaged-view hook and migrate tests to renderHookWithProviders so they run with provider state. Use an effect event so the timer only resets when the viewed group changes while still tracking with current metadata. Co-Authored-By: Claude <[email protected]> Co-authored-by: Cursor <[email protected]>
Align the hook signature with useTrackView by accepting Group and Project objects instead of primitive IDs. This simplifies call sites and maintains consistency with other tracking hooks in the codebase.
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Update docstring to accurately describe that each 10+ second viewing session is tracked separately, not once per group per component instance.
scttcper
approved these changes
Feb 14, 2026
1 task
mchen-sentry
pushed a commit
that referenced
this pull request
Feb 24, 2026
These events will be fired for issue details views where a user has spent >10s on the page before bouncing. We track some similar information in https://github.com/getsentry/sentry/blob/master/static/gsApp/hooks/useRouteActivatedHook.tsx#L134-L153 but there are unique differences: - This PR will only fire the events if the user is still on the page after 10s, the existing events are fired after 7s or sooner if a user navigates elsewhere. - The event in this PR is reusable in the future and we will fire it anywhere we show a significant amount of an issue to a user (ex: if Seer explorer were to show a rich preview) --------- Co-authored-by: Scott Cooper <[email protected]> Co-authored-by: Claude <[email protected]> Co-authored-by: Cursor <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These events will be fired for issue details views where a user has spent >10s on the page before bouncing.
We track some similar information in https://github.com/getsentry/sentry/blob/master/static/gsApp/hooks/useRouteActivatedHook.tsx#L134-L153 but there are unique differences: