From d846068c71853221ac53239c9efc56e3e795e6c3 Mon Sep 17 00:00:00 2001 From: Jussi Steenari Date: Mon, 15 Feb 2021 15:00:50 +0200 Subject: [PATCH] Add Matomo tracking for file downloads Signed-off-by: Jussi Steenari Co-signed-off by: Harri Hirvonsalo --- webui/src/components/editfiles.jsx | 10 +++++++++- webui/src/components/record.jsx | 22 +++++++++++++--------- webui/src/main.jsx | 2 +- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/webui/src/components/editfiles.jsx b/webui/src/components/editfiles.jsx index 2037f86b4f..535cc35a25 100644 --- a/webui/src/components/editfiles.jsx +++ b/webui/src/components/editfiles.jsx @@ -683,6 +683,7 @@ export const FileRecordRow = React.createClass({ file: PT.object.isRequired, remove: PT.func, b2noteWidget: PT.oneOfType([PT.object, PT.bool]), + catchMatomoEvent: PT.func, }, getInitialState() { @@ -697,6 +698,9 @@ export const FileRecordRow = React.createClass({ alert(msg + ' copied to clipboard!'); }, + + + render() { let file = this.props.file; file = file.toJS ? file.toJS() : file; @@ -711,7 +715,11 @@ export const FileRecordRow = React.createClass({ style={{fontSize:10}} aria-hidden="true"/>