Skip to content

Add collectionId to PLAYBACK_PLAY analytics events#14101

Merged
dylanjeffers merged 3 commits intomainfrom
claude/playlist-plays-analytics-eSesJ
Apr 10, 2026
Merged

Add collectionId to PLAYBACK_PLAY analytics events#14101
dylanjeffers merged 3 commits intomainfrom
claude/playlist-plays-analytics-eSesJ

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

Summary

  • Adds collectionId to the PlaybackPlay Amplitude analytics event type, so every PLAYBACK_PLAY event fired from a playlist/album context now includes the collection ID
  • Enriches all collection play surfaces: web collection page, web collection tiles (desktop + mobile), queue sagas (passive next/prev), and mobile collection screen
  • Complements the PLAYLIST_PLAY event from Add playlist play event tracking across mobile and web #14087 — that tracks playlist-level play intent, while this tracks individual track plays attributed to a specific playlist/album

This enables Amplitude queries like:

  • "How many track plays originated from playlists vs other sources?"
  • "Which playlists drive the most track plays?"
  • "What % of a track's plays came from playlist X?"

Test plan

  • Play a track from a playlist page on web — verify Amplitude Playback: Play event includes collectionId
  • Click a track row within a playlist on web — verify collectionId is present
  • Let a track auto-advance (next) within a playlist on web — verify passive Playback: Play event includes collectionId
  • Play from a collection tile on web (desktop + mobile web) — verify collectionId is present
  • Play a track from a collection screen on mobile — verify collectionId is present
  • Play a track from a non-collection context (e.g. track page, trending) — verify collectionId is NOT present

https://claude.ai/code/session_01QszUni9cixkeUCYyViirgV

…attribution

Enriches the existing Amplitude PLAYBACK_PLAY events with a collectionId
property when a track is played from a playlist/album context. This enables
answering "how many track plays originated from playlists" in Amplitude.

Covers all collection play surfaces:
- Web: collection page (play button + track row clicks)
- Web: collection tiles (desktop + mobile web)
- Web: queue sagas (passive next/previous within a collection)
- Mobile: collection screen (play button + track list item plays)

https://claude.ai/code/session_01QszUni9cixkeUCYyViirgV
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 10, 2026

🦋 Changeset detected

Latest commit: d2e179e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@audius/common Patch
@audius/mobile Patch
@audius/web Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

🌐 Web preview ready

Preview URL: https://audius-web-preview-pr-14101.audius.workers.dev

Unique preview for this PR (deployed from this branch).
Workflow run

@dylanjeffers dylanjeffers merged commit 2e2e7b3 into main Apr 10, 2026
14 checks passed
@dylanjeffers dylanjeffers deleted the claude/playlist-plays-analytics-eSesJ branch April 10, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants