From e838fdb6a3360eda8f486f791afab0d789454113 Mon Sep 17 00:00:00 2001 From: jffarge Date: Thu, 24 Jun 2021 17:17:38 +0200 Subject: [PATCH] docs: :bug: fix amplitude logEvent Signed-off-by: jffarge --- website/src/theme/DocPage/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/theme/DocPage/index.js b/website/src/theme/DocPage/index.js index 527fc125..83cdeb05 100644 --- a/website/src/theme/DocPage/index.js +++ b/website/src/theme/DocPage/index.js @@ -175,10 +175,10 @@ function DocPage(props) { // TODO: DISABLE FOR LOCALHOST ENV import('amplitude-js').then(amplitude => { if (userAccessStatus?.login) { - var amplitudeInstance = amplitude.getInstance().init(process.env.REACT_APP_AMPLITUDE_ID, userAccessStatus?.login, { + var amplitudeInstance = amplitude.getInstance().init(process.env.REACT_APP_AMPLITUDE_ID, userAccessStatus?.login.toLowerCase(), { apiEndpoint: `${window.location.hostname}/t` }); - amplitude.getInstance().logEvent('page view', window.location.pathname); + amplitude.getInstance().logEvent('Docs View', { "path": window.location.pathname }); } }) }