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,
|
||||
tagFollowEvent: (string, boolean, ?string) => void,
|
||||
playerLoadedEvent: (?boolean) => void,
|
||||
playerStartedEvent: (?boolean) => void,
|
||||
videoStartEvent: (string, number) => void,
|
||||
videoBufferEvent: (
|
||||
StreamClaim,
|
||||
|
@ -231,6 +232,9 @@ const analytics: Analytics = {
|
|||
playerLoadedEvent: embedded => {
|
||||
sendMatomoEvent('Player', 'Loaded', embedded ? 'embedded' : 'onsite');
|
||||
},
|
||||
playerStartedEvent: embedded => {
|
||||
sendMatomoEvent('Player', 'Started', embedded ? 'embedded' : 'onsite');
|
||||
},
|
||||
tagFollowEvent: (tag, following) => {
|
||||
sendMatomoEvent('Tag', following ? 'Tag-Follow' : 'Tag-Unfollow', tag);
|
||||
},
|
||||
|
|
|
@ -100,7 +100,7 @@ function VideoViewer(props: Props) {
|
|||
const differenceToAdd = Date.now() - desktopPlayStartTime;
|
||||
timeToStartInMs += differenceToAdd;
|
||||
}
|
||||
|
||||
analytics.playerStartedEvent(embedded);
|
||||
analytics.videoStartEvent(claimId, timeToStartInMs);
|
||||
doAnalyticsView(uri, timeToStartInMs).then(() => {
|
||||
claimRewards();
|
||||
|
|
Loading…
Reference in a new issue