Tweaks to diagnostic events (#2544)

* Tweaks to events

* more tweaks and fixes
This commit is contained in:
Ahsan Virani
2021-12-10 15:29:05 +01:00
committed by GitHub
parent 75c7b5ed97
commit 2125f25791
14 changed files with 142 additions and 50 deletions

View File

@@ -14,14 +14,20 @@
</template>
<script lang="ts">
import Vue from 'vue';
import Telemetry from './components/Telemetry.vue';
export default {
export default Vue.extend({
name: 'App',
components: {
Telemetry,
},
};
watch: {
'$route'(route) {
this.$telemetry.page('Editor', route.name);
},
},
});
</script>
<style lang="scss">

View File

@@ -66,6 +66,12 @@ class Telemetry {
}
}
page(category?: string, name?: string | undefined | null) {
if (this.telemetry) {
this.telemetry.page(category, name);
}
}
trackNodesPanel(event: string, properties: IDataObject = {}) {
if (this.telemetry) {
properties.nodes_panel_session_id = this.userNodesPanelSession.sessionId;

View File

@@ -2526,6 +2526,7 @@ export default mixins(
});
this.$externalHooks().run('nodeView.mount');
this.$telemetry.page('Editor', this.$route.name);
},
destroyed () {