Skip to content

Commit

Permalink
feat: 📝 Update Analytics Ledger Sync LLM (#7865)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcayuelas-ledger committed Sep 23, 2024
1 parent 3dcc282 commit f7f80bd
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 20 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-walls-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

Update Analytics
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const useSelectAddAccountMethodViewModel = ({
}, [navigation, trackButtonClick, onClose]);

const onClickImportLedgerSync = useCallback(() => {
trackButtonClick("Import via another Ledger Live app");
trackButtonClick("Account Use Ledger Sync");
setWalletSyncDrawerVisible?.();
}, [trackButtonClick, setWalletSyncDrawerVisible]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ const Actions = ({
onPressHasAlreadyCreatedAKey();
};

const onPressMore = () => {
onClickTrack({
button: AnalyticsButton.LearnMore,
page: AnalyticsPage.ActivateLedgerSync,
hasFlow: true,
});
onPressLearnMore?.();
};

return (
<Flex flexDirection="column" justifyContent="center" alignItems="center" rowGap={32}>
<Flex flexDirection="column" justifyContent="center" alignItems="center" rowGap={16}>
Expand Down Expand Up @@ -66,7 +75,7 @@ const Actions = ({
</Button>
</Flex>
{onPressLearnMore && (
<Link size="medium" onPress={onPressLearnMore}>
<Link size="medium" onPress={onPressMore}>
{t("walletSync.activation.screen.learnMore")}
</Link>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ export enum AnalyticsPage {
ManageSyncInstances = "Manage synchronized instances",
RemoveInstanceWrongDevice = "Remove instance wrong device connected",
RemoveInstanceSuccess = "Instance removal success",
ManageBackup = "Manage key",
ConfirmDeleteBackup = "Confirm delete key",
DeleteBackupSuccess = "Delete key success",
SyncWithNoKey = "Sync with no key",
ManageBackup = "Delete sync",
ConfirmDeleteBackup = "Confirm delete sync",
DeleteBackupSuccess = "Delete sync success",
SyncWithNoKey = "Scan attempt with no sync",
LedgerSyncActivated = "Ledger Sync activated",
AutoRemove = "Can’t remove current instance",
OtherSeed = "You can’t use this Ledger to Sync",
SameSeed = "App already secured with this Ledger",
ScanAttemptWithSameBackup = "Scan attempt with same backup",
ScanAttemptWithDifferentBackups = "Scan attempt with different backups",
OnBoardingQRCodeNoBackup = "Onboarding no backup detected",
OnBoardingDeviceNoBackup = "Onboarding this Ledger does not secure a backup",
ScanAttemptWithSameBackup = "Scan attempt with same sync",
ScanAttemptWithDifferentBackups = "Scan attempt with different syncs",
OnBoardingQRCodeNoBackup = "Onboarding no sync detected with scan",
OnBoardingDeviceNoBackup = "Onboarding no sync detected with device",
OnboardingAccessExistingWallet = "Onboarding access existing wallet",
}

Expand All @@ -38,11 +38,13 @@ export enum AnalyticsFlow {
}

export enum AnalyticsButton {
SyncYourAccounts = "Sync your accounts",
AlreadyCreatedKey = "Already synced a Ledger Live app",
SyncYourAccounts = "Turn on Ledger Sync",
AlreadyCreatedKey = "I already turned it on",
Close = "Close",
LearnMore = "How does Ledger Sync work",
UseYourLedger = "Use your Ledger",
ScanQRCode = "Scan a QR code",
UseLedgerSync = "Use Ledger Sync",
SyncWithAnotherLedgerLive = "Sync with another Ledger Live app",
ShowQRCode = "Show QR",
TryAgain = "Try again",
Expand All @@ -51,10 +53,10 @@ export enum AnalyticsButton {
ManageInstances = "Manage instances",
RemoveInstance = "Remove instance",
ConnectAnotherLedger = "Connect another Ledger",
DeleteKey = "Delete key",
Delete = "Delete",
DeleteKey = "Delete sync",
Delete = "Yes Delete",
Cancel = "Cancel",
CreateYourKey = "Create your key",
Keep = "Keep",
LedgerSync = "Ledger Sync",
UseAnother = "Connect another ledger",
Understand = "I understand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function useSpecificError({ primaryAction, secondaryAction }: SpecificPro
};

const onCreate = (props: AnalyticsProps) => {
onClickTrack({ button: AnalyticsButton.CreateYourKey, ...props });
onClickTrack({ button: AnalyticsButton.SyncYourAccounts, ...props });
};

const ContinueWihtoutSync = (props: AnalyticsProps) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const useManageKeyDrawer = () => {
const handleCancel = () => {
closeDrawer();
track("button_clicked", {
button: AnalyticsButton.Cancel,
button: AnalyticsButton.Keep,
page: AnalyticsPage.ConfirmDeleteBackup,
});
};
Expand All @@ -76,9 +76,9 @@ export const useManageKeyDrawer = () => {
isDrawerVisible,
openDrawer,
closeDrawer,
handleClose,
onClickConfirm,
deleteMutation,
handleCancel,
handleClose,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const QrCodeMethod = ({
const handleSelectOption = (option: OptionsType) => {
setSelectedOption(option);
const button =
option === Options.SCAN ? AnalyticsButton.ScanQRCode : AnalyticsButton.ShowQRCode;
option === Options.SCAN ? AnalyticsButton.ShowQRCode : AnalyticsButton.ScanQRCode;
const page = option === Options.SCAN ? AnalyticsPage.ShowQRCode : AnalyticsPage.ScanQRCode;
onClickTrack({
button,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function AccessExistingWallet() {
title: t("onboarding.welcomeBackStep.walletSync"),
event: "button_clicked",
eventProperties: {
button: AnalyticsButton.SyncWithAnotherLedgerLive,
button: AnalyticsButton.UseLedgerSync,
page: AnalyticsPage.OnboardingAccessExistingWallet,
},
testID: "Existing Wallet | Wallet Sync",
Expand Down

0 comments on commit f7f80bd

Please sign in to comment.