mirror of
https://github.com/PostHog/posthog.git
synced 2024-12-01 12:21:02 +01:00
feat: Add screen name info to recordings (#13931)
This commit is contained in:
parent
57f06ae479
commit
ce2b675270
@ -204,6 +204,14 @@ export function PlayerMeta(props: SessionRecordingPlayerLogicProps): JSX.Element
|
||||
</span>
|
||||
</span>
|
||||
)}
|
||||
{lastPageviewEvent?.properties?.['$screen_name'] && (
|
||||
<span className="flex items-center gap-2 truncate">
|
||||
<span>·</span>
|
||||
<span className="flex items-center gap-1 truncate">
|
||||
{lastPageviewEvent?.properties['$screen_name']}
|
||||
</span>
|
||||
</span>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
<div className={clsx('flex-1', isSmallPlayer ? 'min-w-4' : 'min-w-20')} />
|
||||
|
@ -27,6 +27,9 @@ export function ItemEvent({ item, expanded, setExpanded }: ItemEventProps): JSX.
|
||||
{item.data.properties.$pathname || item.data.properties.$current_url}
|
||||
</span>
|
||||
) : null}
|
||||
{item.data.event === '$screen' ? (
|
||||
<span className="text-muted-alt">{item.data.properties.$screen_name}</span>
|
||||
) : null}
|
||||
</div>
|
||||
</LemonButton>
|
||||
|
||||
|
@ -81,7 +81,10 @@ export const playerMetaLogic = kea<playerMetaLogicType>({
|
||||
// Go through the events in reverse to find thelatest pageview
|
||||
for (let i = events.length - 1; i >= 0; i--) {
|
||||
const event = events[i]
|
||||
if (event.event === '$pageview' && (event.playerTime ?? 0) < playerTimeClosestSecond) {
|
||||
if (
|
||||
(event.event === '$screen' || event.event === '$pageview') &&
|
||||
(event.playerTime ?? 0) < playerTimeClosestSecond
|
||||
) {
|
||||
return event
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user