GA: entered livestream (#364)
## Issue 85: "user joined livestream" ## Approach Add it into the existing "player :: action" event, so we can compare it againts `loaded_video | loaded_image | loaded_markdown | loaded_audio`.
This commit is contained in:
parent
6bbf310348
commit
781f1b712e
2 changed files with 8 additions and 1 deletions
|
@ -383,6 +383,8 @@ const analytics: Analytics = {
|
|||
return 'loaded_markdown';
|
||||
case RENDER_MODES.IMAGE:
|
||||
return 'loaded_image';
|
||||
case 'livestream':
|
||||
return 'loaded_livestream';
|
||||
default:
|
||||
return 'loaded_misc';
|
||||
}
|
||||
|
|
|
@ -23,6 +23,11 @@ export default function LivestreamPage(props: Props) {
|
|||
const [isLive, setIsLive] = React.useState('pending');
|
||||
const livestreamChannelId = channelClaim && channelClaim.signing_channel && channelClaim.signing_channel.claim_id;
|
||||
|
||||
React.useEffect(() => {
|
||||
// TODO: This should not be needed one we unify the livestream player (?)
|
||||
analytics.playerLoadedEvent('livestream', false);
|
||||
}, []);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!livestreamChannelId) {
|
||||
setIsLive(false);
|
||||
|
|
Loading…
Reference in a new issue