Bare ids are unreadable in the dashboard, so every event that points at a
show or a person now carries its title or name. Ids stay for disambiguation,
since titles collide across remakes.
- ShowRef gains showTitle, so show_viewed, library_toggled, torrents_searched,
torrent_selected, playback_started and playback_failed all report it
- person_viewed sends personName
- random_shuffled sends the title of the movie scrolled to
- torrent_selected sends the torrent title next to the show title
- subtitles_selected sends the track label, such as English, rather than the
internal track value
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
analytics.showViewed({...}) reads better than track('show_viewed', {...}) and
drops the track_ alias Captions needed, where vidstack already exports track.
The methods are derived from the event catalogue with a mapped type plus a
Proxy rather than written out, so the catalogue stays the only place an event
is declared and the two cannot drift. Names stay snake_case on the wire.
Emitters are cached so a method is referentially stable and safe to pass to a
hook or use as an effect dependency.
Events with no payload are typed void and take no arguments.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Replaces Vercel Analytics with OpenPanel, driven entirely by env vars so the
whole layer is inert until NEXT_PUBLIC_OPENPANEL_CLIENT_ID is set.
Zero initial load cost. next/script emits a rel=preload even on lazyOnload,
which pulls the sdk during the first paint, so the component skips it: it
inlines the 416 byte official stub (window.op queues calls immediately) and
appends the real script itself on window load plus requestIdleCallback. The
built html carries no preload and no script src for the analytics host.
Events live in one typed catalogue (lib/analytics/events.ts) and track() is
keyed to it, so a wrong name or payload is a type error rather than a silent
bad row. Emitters sit in the hooks that already own the behaviour instead of
being sprinkled through components:
- useShowState covers every favourite and watchlist toggle
- useInfiniteList covers pagination for all six lists
- useTorrents covers all three providers
- Preview, Person and useSearch use a shared useTrackOnce hook
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Movies get a theatre/stream/blu-ray icon in the info row, series get the
latest aired episode as S03 E07. Both reveal the relevant dates on hover or
tap through a shared Hint tooltip.
Release dates ride along on the details request via append_to_response and
the series fields are already in the tv payload, so neither indicator costs
an extra call. Theatre state is only claimed while the run can still be
current, otherwise a classic with no digital entry would read as in cinemas.
The credits carousel now opens with the director, read from the crew array
that the credits response already carries. A series has no single director,
so the one behind most episodes stands in.
Drop with_cast from the starring query: TMDB ANDs it with with_people, so
every director link would have resolved to an empty list.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>