chore: move analytics to platform (#2960)

This commit is contained in:
Akash K
2023-04-04 02:15:20 +05:30
committed by GitHub
parent defece95fc
commit 37a3b72025
19 changed files with 140 additions and 198 deletions

View File

@@ -26,7 +26,7 @@
</template>
<script setup lang="ts">
import { logHoppRequestRunToAnalytics } from "~/helpers/fb/analytics"
import { platform } from "~/platform"
import { GQLConnection } from "~/helpers/GQLConnection"
import { getCurrentStrategyID } from "~/helpers/network"
import { useReadonlyStream, useStream } from "@composables/stream"
@@ -48,7 +48,7 @@ const onConnectClick = () => {
if (!connected.value) {
props.conn.connect(url.value, headers.value as any)
logHoppRequestRunToAnalytics({
platform.analytics?.logHoppRequestRunToAnalytics({
platform: "graphql-schema",
strategy: getCurrentStrategyID(),
})

View File

@@ -379,7 +379,7 @@ import {
import { commonHeaders } from "~/helpers/headers"
import { GQLConnection } from "~/helpers/GQLConnection"
import { makeGQLHistoryEntry, addGraphqlHistoryEntry } from "~/newstore/history"
import { logHoppRequestRunToAnalytics } from "~/helpers/fb/analytics"
import { platform } from "~/platform"
import { getCurrentStrategyID } from "~/helpers/network"
import { useCodemirror } from "@composables/codemirror"
import jsonLinter from "~/helpers/editor/linting/json"
@@ -748,7 +748,7 @@ const runQuery = async () => {
console.error(e)
}
logHoppRequestRunToAnalytics({
platform.analytics?.logHoppRequestRunToAnalytics({
platform: "graphql-query",
strategy: getCurrentStrategyID(),
})