feat: add analytics logging while hoppscotch requests are fired
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -141,6 +141,7 @@
|
||||
import { io as Client } from "socket.io-client"
|
||||
import wildcard from "socketio-wildcard"
|
||||
import debounce from "~/helpers/utils/debounce"
|
||||
import { logHoppRequestRunToAnalytics } from "~/helpers/fb/analytics"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -262,6 +263,10 @@ export default {
|
||||
icon: "error",
|
||||
})
|
||||
}
|
||||
|
||||
logHoppRequestRunToAnalytics({
|
||||
platform: "socketio",
|
||||
})
|
||||
},
|
||||
disconnect() {
|
||||
this.io.close()
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { logHoppRequestRunToAnalytics } from "~/helpers/fb/analytics"
|
||||
import debounce from "~/helpers/utils/debounce"
|
||||
|
||||
export default {
|
||||
@@ -158,6 +159,10 @@ export default {
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
logHoppRequestRunToAnalytics({
|
||||
platform: "mqtt",
|
||||
})
|
||||
},
|
||||
handleSSEError(error) {
|
||||
this.stop()
|
||||
|
||||
@@ -159,6 +159,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { logHoppRequestRunToAnalytics } from "~/helpers/fb/analytics"
|
||||
import debounce from "~/helpers/utils/debounce"
|
||||
|
||||
export default {
|
||||
@@ -273,6 +274,10 @@ export default {
|
||||
icon: "error",
|
||||
})
|
||||
}
|
||||
|
||||
logHoppRequestRunToAnalytics({
|
||||
platform: "wss",
|
||||
})
|
||||
},
|
||||
disconnect() {
|
||||
if (this.socket) {
|
||||
|
||||
Reference in New Issue
Block a user