diff --git a/packages/atlas/src/components/_video/VideoPlayer/VideoPlayer.tsx b/packages/atlas/src/components/_video/VideoPlayer/VideoPlayer.tsx index f24b1d27ec..bcdd176c07 100644 --- a/packages/atlas/src/components/_video/VideoPlayer/VideoPlayer.tsx +++ b/packages/atlas/src/components/_video/VideoPlayer/VideoPlayer.tsx @@ -189,6 +189,7 @@ const VideoPlayerComponent: ForwardRefRenderFunction { const [currentVideosTab, setCurrentVideosTab] = useState(0) const { currentChannel, isLoading } = useGetYppSyncedChannels() const { trackPageView } = useSegmentAnalytics() + const { processingAssets, uploads } = useUploadsStore() const subscribersCount = currentChannel?.subscribersCount || 0 const currentTier = TIERS.reduce((prev, current, idx) => { @@ -43,8 +45,14 @@ export const YppDashboard: FC = () => { }, 0) useEffect(() => { + // if user avatar is currently processing membership will be refetched when it's uploaded, + // which will trigger page view event + const avatarId = uploads.find((upload) => upload.type === 'avatar')?.id + if (avatarId && processingAssets.some((asset) => asset.id === avatarId)) { + return + } trackPageView('YPP Dashboard', { tab: TABS[currentVideosTab] }) - }, [currentVideosTab, trackPageView]) + }, [currentVideosTab, processingAssets, trackPageView, uploads]) const tiersTooltip = atlasConfig.features.ypp.tiersDefinition?.tiersTooltip diff --git a/packages/atlas/src/views/viewer/VideoView/VideoView.tsx b/packages/atlas/src/views/viewer/VideoView/VideoView.tsx index 5e06864d9c..1c410e7b73 100644 --- a/packages/atlas/src/views/viewer/VideoView/VideoView.tsx +++ b/packages/atlas/src/views/viewer/VideoView/VideoView.tsx @@ -146,10 +146,11 @@ export const VideoView: FC = () => { trackPageView('Video', { videoId: video.id, videoTitle: video.title || undefined, + isNft: !!video.nft?.id, category: video.category?.name || undefined, }) } - }, [trackPageView, video?.category?.name, video?.id, video?.title]) + }, [trackPageView, video?.category?.name, video?.id, video?.nft?.id, video?.title]) const videoMetaTags = useMemo(() => { if (!video || !thumbnailUrls) return {}