feat(analytics): add feed_type to Playback: Play events from the feed#14527
Open
dylanjeffers wants to merge 1 commit into
Open
feat(analytics): add feed_type to Playback: Play events from the feed#14527dylanjeffers wants to merge 1 commit into
dylanjeffers wants to merge 1 commit into
Conversation
Plays originating from the feed lineup now carry a feed_type property (FOR_YOU / LATEST, matching Feed: Change view's view values) so engagement on the two feed views can be measured separately. The feed view is stamped onto playback queue entries when the feed lineup builds them (same pattern as collectionId), so passive plays from queue auto-advance report the view the track actually came from even if the user has since switched tabs. Track-tile plays on the feed page include it directly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds a
feed_typeproperty toPlayback: Playanalytics events for plays originating from the feed lineup, so engagement on the "For You" vs "Latest" feed can be measured separately. Values match theviewproperty ofFeed: Change view(FOR_YOU/LATEST).How it works
PlaybackTrackqueue entries get an optionalfeedType, stamped byTrackLineupwhen the feed page builds the queue (same pattern as the existingcollectionIdanalytics field). Snapshotting at queue time means passive plays (queue auto-advance vianext/previous) report the view the track actually came from, even if the user switches tabs mid-playback.watchNext/watchPrevious) attachesfeed_typeto thesource: passivePLAYBACK_PLAYevents via a newgetFeedTypeselector.source: track tile lineup) includefeed_typedirectly from the active tab.feedType={feedTab}toTrackLineup.Note:
CHRONOLOGICALno longer exists in theFeedTabenum (it was migrated toLATEST), so new events emit onlyFOR_YOU/LATEST.Purely analytics instrumentation — no UI changes.
Testing
npm run typecheckclean inpackages/commonandpackages/web🤖 Generated with Claude Code