From 32b33b63661f58ae025539bab381a77aa1970c17 Mon Sep 17 00:00:00 2001 From: Ramy EL BEHEDY <32883529+RamyEB@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:19:50 +0200 Subject: [PATCH] Setup analytics for Web3Hub (#7666) * feat: add track screens on Web3Hub --- .changeset/pink-walls-tickle.md | 5 +++++ apps/ledger-live-mobile/src/locales/en/common.json | 3 +-- .../newArch/features/Web3Hub/screens/Web3HubApp/index.tsx | 2 ++ .../Web3HubMain/components/ManifestsCategoryList/index.tsx | 5 +++-- .../newArch/features/Web3Hub/screens/Web3HubMain/index.tsx | 3 +++ .../newArch/features/Web3Hub/screens/Web3HubSearch/index.tsx | 2 ++ 6 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 .changeset/pink-walls-tickle.md diff --git a/.changeset/pink-walls-tickle.md b/.changeset/pink-walls-tickle.md new file mode 100644 index 000000000000..95cec4074f24 --- /dev/null +++ b/.changeset/pink-walls-tickle.md @@ -0,0 +1,5 @@ +--- +"live-mobile": patch +--- + +Setup analytics on Web3Hub diff --git a/apps/ledger-live-mobile/src/locales/en/common.json b/apps/ledger-live-mobile/src/locales/en/common.json index 1d0e17e95129..f6acbdcb4724 100644 --- a/apps/ledger-live-mobile/src/locales/en/common.json +++ b/apps/ledger-live-mobile/src/locales/en/common.json @@ -6919,8 +6919,7 @@ "placeholder": "Search or type a URL" }, "clearSigning": { - "title": "Clear signing", - "description": "Clear signing allows you to sign a message without revealing the content of the message to the app. This is useful for privacy and security reasons." + "title": "Clear signing" } }, "app": { diff --git a/apps/ledger-live-mobile/src/newArch/features/Web3Hub/screens/Web3HubApp/index.tsx b/apps/ledger-live-mobile/src/newArch/features/Web3Hub/screens/Web3HubApp/index.tsx index 0f724b0cb52b..fc0ed4af7517 100644 --- a/apps/ledger-live-mobile/src/newArch/features/Web3Hub/screens/Web3HubApp/index.tsx +++ b/apps/ledger-live-mobile/src/newArch/features/Web3Hub/screens/Web3HubApp/index.tsx @@ -7,6 +7,7 @@ import WebPlatformPlayer from "./components/Web3Player"; import GenericErrorView from "~/components/GenericErrorView"; import useWeb3HubAppViewModel from "./useWeb3HubAppViewModel"; import Header, { TOTAL_HEADER_HEIGHT } from "./components/Header"; +import { TrackScreen } from "~/analytics"; const appManifestNotFoundError = new Error("App not found"); @@ -29,6 +30,7 @@ export default function Web3HubApp({ navigation, route }: AppProps) { return ( +
{ +const ManifestsCategoryList = ({ title, categoryId, navigation, testID }: Props) => { const { data, isLoading, onEndReached } = useManifestsListViewModel(categoryId); const goToApp = useCallback( @@ -37,7 +38,7 @@ const ManifestsCategoryList = ({ title, categoryId, navigation }: Props) => { onPressItem={disclaimer.onPressItem} isLoading={isLoading} onEndReached={onEndReached} - testID="web3hub-clear-signing-scroll" + testID={testID} /> ) : null; diff --git a/apps/ledger-live-mobile/src/newArch/features/Web3Hub/screens/Web3HubMain/index.tsx b/apps/ledger-live-mobile/src/newArch/features/Web3Hub/screens/Web3HubMain/index.tsx index a8ba542ff760..5482fd42aea7 100644 --- a/apps/ledger-live-mobile/src/newArch/features/Web3Hub/screens/Web3HubMain/index.tsx +++ b/apps/ledger-live-mobile/src/newArch/features/Web3Hub/screens/Web3HubMain/index.tsx @@ -9,6 +9,7 @@ import { MAIN_BUTTON_BOTTOM, MAIN_BUTTON_SIZE } from "~/components/TabBar/shared import Header, { ANIMATION_HEIGHT, TOTAL_HEADER_HEIGHT } from "./components/Header"; import ManifestsCategoryList from "./components/ManifestsCategoryList"; import { Text } from "@ledgerhq/native-ui"; +import { TrackScreen } from "~/analytics"; const PADDING_BOTTOM = MAIN_BUTTON_SIZE + MAIN_BUTTON_BOTTOM; @@ -20,6 +21,8 @@ export default function Web3HubMain({ navigation }: MainProps) { return ( + +
+