diff --git a/ui/analytics.js b/ui/analytics.js index ddd692947..aac0a8b7e 100644 --- a/ui/analytics.js +++ b/ui/analytics.js @@ -45,7 +45,7 @@ type Analytics = { bufferDuration: number, bitRate: number, duration: number, - userIdHash: string, + userId: string, playerPoweredBy: string, readyState: number, } @@ -217,7 +217,7 @@ const analytics: Analytics = { body: JSON.stringify({ device: 'web', type: 'buffering', - client: data.userIdHash, + client: data.userId, data: { url: claim.canonical_url, position: data.timeAtBuffer, diff --git a/ui/redux/actions/app.js b/ui/redux/actions/app.js index 8af6e5c0a..6ce28b445 100644 --- a/ui/redux/actions/app.js +++ b/ui/redux/actions/app.js @@ -55,8 +55,6 @@ import analytics, { SHARE_INTERNAL } from 'analytics'; import { doSignOutCleanup } from 'util/saved-passwords'; import { doSocketConnect } from 'redux/actions/websocket'; import { stringifyServerParam, shouldSetSetting } from 'util/sync-settings'; -import sha256 from 'crypto-js/sha256'; -import Base64 from 'crypto-js/enc-base64'; // @if TARGET='app' const { autoUpdater } = remote.require('electron-updater'); @@ -502,13 +500,13 @@ export function doAnalyticsBuffer(uri, bufferData) { const fileSize = source.size; // size in bytes const fileSizeInBits = fileSize * 8; const bitRate = parseInt(fileSizeInBits / fileDurationInSeconds); - const userIdHash = Base64.stringify(sha256(user.id)); + const userId = user.id; analytics.videoBufferEvent(claim, { timeAtBuffer, bufferDuration, bitRate, - userIdHash, + userId, duration: fileDurationInSeconds, playerPoweredBy: bufferData.playerPoweredBy, readyState: bufferData.readyState,