🐛 Fix: fix analytics value

This commit is contained in:
PiEgg 2021-04-05 22:43:23 +08:00
parent f53639153e
commit 06d40ef7f6

View File

@ -41,12 +41,8 @@ const handleBaiduTongJi = (webContents: WebContents, options: IAnalyticsData) =>
const data: IBaiduTongJiOptions = { const data: IBaiduTongJiOptions = {
category: 'upload', category: 'upload',
action: options.fromClipboard ? 'clipboard' : 'files', // 上传剪贴板图片还是选择的文件 action: options.fromClipboard ? 'clipboard' : 'files', // 上传剪贴板图片还是选择的文件
opt_label: JSON.stringify({ opt_label: options.type,
type: options.type, // 上传的图床种类 opt_value: options.duration
count: options.count, // 上传的图片数量
timestamp: dayjs().format('YYYYMMDDHHmmss'), // 上传完成的时间戳
duration: options.duration // 耗时
})
} }
webContents.send(BAIDU_TONGJI_EVENT, data) webContents.send(BAIDU_TONGJI_EVENT, data)
} }