feat: add analytics logging while hoppscotch requests are fired

This commit is contained in:
Andrew Bastin
2021-07-05 20:02:29 -04:00
parent 913b073ba4
commit 86bd4aa568
8 changed files with 70 additions and 2 deletions

View File

@@ -121,6 +121,7 @@
<script>
import Paho from "paho-mqtt"
import debounce from "~/helpers/utils/debounce"
import { logHoppRequestRunToAnalytics } from "~/helpers/fb/analytics"
export default {
data() {
@@ -191,6 +192,10 @@ export default {
})
this.client.onConnectionLost = this.onConnectionLost
this.client.onMessageArrived = this.onMessageArrived
logHoppRequestRunToAnalytics({
platform: "mqtt",
})
},
onConnectionFailure() {
this.connectionState = false