pass time in ms to analytics for view apis
This commit is contained in:
parent
0f87c8b207
commit
db51789e07
3 changed files with 6 additions and 5 deletions
|
@ -180,7 +180,7 @@ const analytics: Analytics = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
videoStartEvent: (claimId, duration) => {
|
videoStartEvent: (claimId, duration) => {
|
||||||
sendGaTimingEvent('Media', 'TimeToStart', Number((duration * 1000).toFixed(0)), claimId);
|
sendGaTimingEvent('Media', 'TimeToStart', duration, claimId);
|
||||||
sendPromMetric('time_to_start', duration);
|
sendPromMetric('time_to_start', duration);
|
||||||
},
|
},
|
||||||
videoBufferEvent: (claimId, currentTime) => {
|
videoBufferEvent: (claimId, currentTime) => {
|
||||||
|
|
|
@ -85,8 +85,9 @@ function VideoViewer(props: Props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function doTrackingFirstPlay(e: Event, data: any) {
|
function doTrackingFirstPlay(e: Event, data: any) {
|
||||||
analytics.videoStartEvent(claimId, data.secondsToLoad);
|
const timeToStartInMs = data.secondsToLoad * 1000;
|
||||||
doAnalyticsView(uri, data.secondsToLoad).then(() => {
|
analytics.videoStartEvent(claimId, timeToStartInMs);
|
||||||
|
doAnalyticsView(uri, timeToStartInMs).then(() => {
|
||||||
claimRewards();
|
claimRewards();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -6178,9 +6178,9 @@ lazy-val@^1.0.4:
|
||||||
yargs "^13.2.2"
|
yargs "^13.2.2"
|
||||||
zstd-codec "^0.1.1"
|
zstd-codec "^0.1.1"
|
||||||
|
|
||||||
lbry-redux@lbryio/lbry-redux#58ff4d8086cf2d038e0f606f50e04d67efec596a:
|
lbry-redux@lbryio/lbry-redux#c30e1eee2c16f0b7a70f40dc974edb22a157986b:
|
||||||
version "0.0.1"
|
version "0.0.1"
|
||||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/58ff4d8086cf2d038e0f606f50e04d67efec596a"
|
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/c30e1eee2c16f0b7a70f40dc974edb22a157986b"
|
||||||
dependencies:
|
dependencies:
|
||||||
proxy-polyfill "0.1.6"
|
proxy-polyfill "0.1.6"
|
||||||
reselect "^3.0.0"
|
reselect "^3.0.0"
|
||||||
|
|
Loading…
Reference in a new issue