Skip to content

Conversation

@dylanjeffers
Copy link
Contributor

@dylanjeffers dylanjeffers commented Feb 5, 2026

We should analyze usage here and pair back explore page to what's working. helps simplify and improve performance


Note

Medium Risk
Touches analytics instrumentation across many Explore/Search-Explore components; risk is mainly accidental over/under-counting due to in-view detection and dependency changes, but no core business logic is modified.

Overview
Adds new Explore analytics events (Explore: Section View and Explore: Section Click) to the shared analytics model, including a typed ExploreSectionName union and event payload fields (section, source, optional id/kind/link).

On mobile Explore, replaces useDeferredElement usage with a new useExploreSectionTracking hook that fires a section-impression event when each section enters view.

On web Search/Explore, introduces a similar useExploreSectionTracking hook and swaps existing deferred rendering in multiple sections to use it; additionally wires click tracking into TrackArtCard, CollectionArtCard, and UserArtCard (when provided a sectionName) before navigating.

Written by Cursor Bugbot for commit 84b5817. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link

changeset-bot bot commented Feb 5, 2026

⚠️ No Changeset found

Latest commit: 84b5817

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link
Member

@raymondjacobson raymondjacobson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this data is going to be high quality enough

}) => {
const { user_id, name, handle, follower_count } = user
const { trackEvent } = useAnalytics()
const isMobile = typeof window !== 'undefined' && window.innerWidth < 768
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we have helpers for this?

@dylanjeffers dylanjeffers merged commit 93929a8 into main Feb 9, 2026
5 checks passed
@dylanjeffers dylanjeffers deleted the explore-analytics branch February 9, 2026 21:10
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

section: sectionName,
source: isMobile ? 'mobile' : 'web',
id,
kind: 'playlist',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Collection click analytics hardcodes kind as playlist

Low Severity

CollectionArtCard hardcodes kind: 'playlist' in the EXPLORE_SECTION_CLICK analytics event, but a collection can also be an album. Since the ExploreSectionClick type explicitly supports both 'playlist' and 'album' as valid kinds, the analytics data will misclassify album clicks as playlist clicks. The collection data from useCollection is already available and could be used to determine the correct kind.

Fix in Cursor Fix in Web

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