docs: hotjar

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-08-06 15:39:54 +02:00
parent ea14025e85
commit 2b5e789b89

View File

@ -170,6 +170,10 @@ function DocPage(props) {
apiEndpoint: `${window.location.hostname}/t` apiEndpoint: `${window.location.hostname}/t`
}); });
amplitude.getInstance().logEvent('Docs Viewed', { "hostname": window.location.hostname, "path": location.pathname }); amplitude.getInstance().logEvent('Docs Viewed', { "hostname": window.location.hostname, "path": location.pathname });
if (window?.hj) {
window.hj("identify", userAccessStatus?.login.toLowerCase(), {});
}
} }
}) })
}, [location.pathname, userAccessStatus]) }, [location.pathname, userAccessStatus])