player started event (embedded)
This commit is contained in:
parent
adde73605d
commit
b736444306
2 changed files with 5 additions and 1 deletions
|
@ -36,6 +36,7 @@ type Analytics = {
|
||||||
apiSyncTags: ({}) => void,
|
apiSyncTags: ({}) => void,
|
||||||
tagFollowEvent: (string, boolean, ?string) => void,
|
tagFollowEvent: (string, boolean, ?string) => void,
|
||||||
playerLoadedEvent: (?boolean) => void,
|
playerLoadedEvent: (?boolean) => void,
|
||||||
|
playerStartedEvent: (?boolean) => void,
|
||||||
videoStartEvent: (string, number) => void,
|
videoStartEvent: (string, number) => void,
|
||||||
videoBufferEvent: (
|
videoBufferEvent: (
|
||||||
StreamClaim,
|
StreamClaim,
|
||||||
|
@ -231,6 +232,9 @@ const analytics: Analytics = {
|
||||||
playerLoadedEvent: embedded => {
|
playerLoadedEvent: embedded => {
|
||||||
sendMatomoEvent('Player', 'Loaded', embedded ? 'embedded' : 'onsite');
|
sendMatomoEvent('Player', 'Loaded', embedded ? 'embedded' : 'onsite');
|
||||||
},
|
},
|
||||||
|
playerStartedEvent: embedded => {
|
||||||
|
sendMatomoEvent('Player', 'Started', embedded ? 'embedded' : 'onsite');
|
||||||
|
},
|
||||||
tagFollowEvent: (tag, following) => {
|
tagFollowEvent: (tag, following) => {
|
||||||
sendMatomoEvent('Tag', following ? 'Tag-Follow' : 'Tag-Unfollow', tag);
|
sendMatomoEvent('Tag', following ? 'Tag-Follow' : 'Tag-Unfollow', tag);
|
||||||
},
|
},
|
||||||
|
|
|
@ -100,7 +100,7 @@ function VideoViewer(props: Props) {
|
||||||
const differenceToAdd = Date.now() - desktopPlayStartTime;
|
const differenceToAdd = Date.now() - desktopPlayStartTime;
|
||||||
timeToStartInMs += differenceToAdd;
|
timeToStartInMs += differenceToAdd;
|
||||||
}
|
}
|
||||||
|
analytics.playerStartedEvent(embedded);
|
||||||
analytics.videoStartEvent(claimId, timeToStartInMs);
|
analytics.videoStartEvent(claimId, timeToStartInMs);
|
||||||
doAnalyticsView(uri, timeToStartInMs).then(() => {
|
doAnalyticsView(uri, timeToStartInMs).then(() => {
|
||||||
claimRewards();
|
claimRewards();
|
||||||
|
|
Loading…
Reference in a new issue