web/satellite: send more analytics events for onboarding selection

This change causes analytics events to be sent when the user has chosen
to continue onboarding in the browser or to skip onboarding.
Previously, only the the selection to onboard in the CLI flow was
tracked.

Change-Id: I44bdac6b8704a67382d8655767cdaea691191cbe
This commit is contained in:
Jeremy Wharton 2023-10-04 17:50:37 -05:00 committed by Storj Robot
parent 60bf9531af
commit 3ca626a878
2 changed files with 10 additions and 1 deletions

View File

@ -39,6 +39,7 @@ import { useAppStore } from '@/store/modules/appStore';
import { useConfigStore } from '@/store/modules/configStore';
import { PartneredSatellite } from '@/types/config';
import { useAnalyticsStore } from '@/store/modules/analyticsStore';
import { OnboardingOption } from '@/types/common';
import OverviewContainer from '@/components/onboardingTour/steps/common/OverviewContainer.vue';
@ -60,6 +61,7 @@ async function onSkip(): Promise<void> {
endOnboarding();
await router.push(projectDashboardPath);
appStore.updateActiveModal(MODALS.createProjectPassphrase);
analyticsStore.linkEventTriggered(AnalyticsEvent.PATH_SELECTED, OnboardingOption.Skip);
}
/**
@ -68,7 +70,7 @@ async function onSkip(): Promise<void> {
*/
function onUplinkCLIClick(): void {
router.push(RouteConfig.OnboardingTour.with(RouteConfig.OnbCLIStep).with(RouteConfig.AGName).path);
analyticsStore.linkEventTriggered(AnalyticsEvent.PATH_SELECTED, 'CLI');
analyticsStore.linkEventTriggered(AnalyticsEvent.PATH_SELECTED, OnboardingOption.CLI);
analyticsStore.pageVisit(RouteConfig.OnboardingTour.with(RouteConfig.OnbCLIStep).with(RouteConfig.AGName).path);
}
@ -78,6 +80,7 @@ function onUplinkCLIClick(): void {
async function onUploadInBrowserClick(): Promise<void> {
endOnboarding();
appStore.updateActiveModal(MODALS.createProjectPassphrase);
analyticsStore.linkEventTriggered(AnalyticsEvent.PATH_SELECTED, OnboardingOption.Browser);
}
async function endOnboarding(): Promise<void> {

View File

@ -14,6 +14,12 @@ export enum OnboardingOS {
LINUX = 'linux',
}
export enum OnboardingOption {
Browser = 'Continue in Browser',
CLI = 'CLI',
Skip = 'Skip',
}
export class PricingPlanInfo {
constructor(
public type: PricingPlanType = PricingPlanType.FREE,