docs: 🐛 fix amplitude logEvent

Signed-off-by: jffarge <jf@dagger.io>
This commit is contained in:
jffarge 2021-06-24 17:17:38 +02:00
parent 0e2372be94
commit e838fdb6a3

View File

@ -175,10 +175,10 @@ function DocPage(props) {
// TODO: DISABLE FOR LOCALHOST ENV // TODO: DISABLE FOR LOCALHOST ENV
import('amplitude-js').then(amplitude => { import('amplitude-js').then(amplitude => {
if (userAccessStatus?.login) { 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` apiEndpoint: `${window.location.hostname}/t`
}); });
amplitude.getInstance().logEvent('page view', window.location.pathname); amplitude.getInstance().logEvent('Docs View', { "path": window.location.pathname });
} }
}) })
} }