init amplitude with appropriate ID

Signed-off-by: jffarge <jf@dagger.io>
This commit is contained in:
jffarge 2022-03-29 13:55:09 +02:00
parent 2a1c4a6bf1
commit 8a67e88708

View File

@ -140,6 +140,9 @@ function DocPage(props) {
// DocPage Swizzle
useEffect(() => {
var instance1 = amplitude.getInstance().init(process.env.REACT_APP_AMPLITUDE_ID, null, {
apiEndpoint: `${window.location.hostname}/t`
})
amplitude.getInstance().logEvent('Docs Viewed', { "hostname": window.location.hostname, "path": location.pathname });
}, [location.pathname])
// End DocPageSwizzle