From c52308e6231b3d2f28b9dcd877ff732ead28bdd9 Mon Sep 17 00:00:00 2001 From: cami Date: Sat, 24 Jul 2021 01:14:25 +0200 Subject: [PATCH] Update logger config and create a session usermapping --- frontend/src/components/pages/Study.jsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/pages/Study.jsx b/frontend/src/components/pages/Study.jsx index a9e0ca1..48e4718 100644 --- a/frontend/src/components/pages/Study.jsx +++ b/frontend/src/components/pages/Study.jsx @@ -32,11 +32,8 @@ export default function Study() { useEffect(() => { _logger.current = new Logger({ - //inputs: ["cursor", "wheel", "keyboard", "touch"], - inputs: ["keyboard"], - // apiUrl: "https://behavior.marcocamenzind.ch", - apiUrl: "http://localhost:5000", - logToConsole: true, + inputs: ["keyboard", "wheel", "cursor", "custom"], + apiUrl: "https://behavior.marcocamenzind.ch", }); _logger.current.init(); authFetch("/api/username", { @@ -112,6 +109,12 @@ export default function Study() { receiveRandomPassword(); setState(STATES.NORMAL); handleLoggerOn(); + // map username and session with the logs + _logger.current.logCustomEvent( + { + name: serverUsername, + }, + ); }; const resetInputValues = () => { -- 2.45.2