From 2b5e789b899f53883ec6d0f3e44bb6d55a7b480c Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Fri, 6 Aug 2021 15:39:54 +0200 Subject: [PATCH] docs: hotjar Signed-off-by: Andrea Luzzardi --- website/src/theme/DocPage/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/src/theme/DocPage/index.js b/website/src/theme/DocPage/index.js index 506b7ffc..40d08637 100644 --- a/website/src/theme/DocPage/index.js +++ b/website/src/theme/DocPage/index.js @@ -170,6 +170,10 @@ function DocPage(props) { apiEndpoint: `${window.location.hostname}/t` }); amplitude.getInstance().logEvent('Docs Viewed', { "hostname": window.location.hostname, "path": location.pathname }); + + if (window?.hj) { + window.hj("identify", userAccessStatus?.login.toLowerCase(), {}); + } } }) }, [location.pathname, userAccessStatus])