feat: submit version in analytics

This commit is contained in:
EnixCoda 2018-11-02 21:46:35 +08:00
parent c1a490c403
commit 26b841921f
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD

View file

@ -1,3 +1,4 @@
import { version } from '../package'
// TODO: set this through ENV or something else
const LOG_ENDPOINT = 'https://enix.one/gitako/log'
@ -29,6 +30,7 @@ function reportError(error) {
`${LOG_ENDPOINT}?${encodeParams({
error: (error && error.message) || error,
path: window.location.href,
version,
})}`
)
}