Extra analytics logging from code review
This commit is contained in:
parent
838904d14e
commit
a1db3bfecf
|
@ -50,6 +50,7 @@ async function identifyByApiKey(apiKey) {
|
||||||
function captureException(err) {
|
function captureException(err) {
|
||||||
if (!analyticsEnabled) return
|
if (!analyticsEnabled) return
|
||||||
Sentry.captureException(err)
|
Sentry.captureException(err)
|
||||||
|
captureEvent("Error", { error: err.message ? err.message : err })
|
||||||
}
|
}
|
||||||
|
|
||||||
function captureEvent(eventName, props = {}) {
|
function captureEvent(eventName, props = {}) {
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
function saveView() {
|
function saveView() {
|
||||||
backendUiStore.actions.views.save(view)
|
backendUiStore.actions.views.save(view)
|
||||||
notifier.success(`View ${view.name} saved.`)
|
notifier.success(`View ${view.name} saved.`)
|
||||||
analytics.captureEvent("Added View Calculate")
|
analytics.captureEvent("Added View Calculate", { field: view.field })
|
||||||
dropdown.hide()
|
dropdown.hide()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -64,7 +64,9 @@
|
||||||
backendUiStore.actions.views.save(view)
|
backendUiStore.actions.views.save(view)
|
||||||
notifier.success(`View ${view.name} saved.`)
|
notifier.success(`View ${view.name} saved.`)
|
||||||
dropdown.hide()
|
dropdown.hide()
|
||||||
analytics.captureEvent("Added View Filter")
|
analytics.captureEvent("Added View Filter", {
|
||||||
|
filters: JSON.stringify(view.filters),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeFilter(idx) {
|
function removeFilter(idx) {
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
// make sure we only fetch once, unless API Key is changed
|
// make sure we only fetch once, unless API Key is changed
|
||||||
if (isApiKeyValid === undefined || apiKey !== lastApiKey) {
|
if (isApiKeyValid === undefined || apiKey !== lastApiKey) {
|
||||||
|
lastApiKey = apiKey
|
||||||
// svelte reactivity was causing a requst to get fired mutiple times
|
// svelte reactivity was causing a requst to get fired mutiple times
|
||||||
// so, we make everything await the same promise, if one exists
|
// so, we make everything await the same promise, if one exists
|
||||||
if (!fetchApiKeyPromise) {
|
if (!fetchApiKeyPromise) {
|
||||||
|
|
Loading…
Reference in New Issue