diff --git a/src/routes/(console)/project-[project]/overview/header.svelte b/src/routes/(console)/project-[project]/overview/header.svelte index be16c1b39..d3251dceb 100644 --- a/src/routes/(console)/project-[project]/overview/header.svelte +++ b/src/routes/(console)/project-[project]/overview/header.svelte @@ -10,6 +10,7 @@ import { user } from '$lib/stores/user'; import { isSmallViewport } from '$lib/stores/viewport'; import { Dependencies } from '$lib/constants'; + import { trackEvent } from '$lib/actions/analytics'; {#if !$page.url.pathname.includes('get-started')} @@ -45,6 +46,7 @@ variant="secondary" size="s" on:click={async () => { + trackEvent('onboarding_hub_platform_dismiss'); await setHasOnboardingDismissed($project.$id); goto(`${base}/project-${$project.$id}/overview`); requestAnimationFrame(() => { diff --git a/src/routes/(console)/project-[project]/overview/onboard.svelte b/src/routes/(console)/project-[project]/overview/onboard.svelte index feeb49746..4c191ff50 100644 --- a/src/routes/(console)/project-[project]/overview/onboard.svelte +++ b/src/routes/(console)/project-[project]/overview/onboard.svelte @@ -37,8 +37,15 @@ import { AvatarGroup } from '$lib/components'; import type { Models } from '@appwrite.io/console'; import { getPlatformInfo } from '$lib/helpers/platform'; + import { trackEvent } from '$lib/actions/analytics'; + import { redirect } from '@sveltejs/kit'; + import { goto } from '$app/navigation'; function createKey() { + trackEvent('onboarding_hub_platform', { + platform: 'server', + state: 'add' + }); wizard.start(Wizard); } @@ -386,7 +393,12 @@ - addPlatform(0)} padding="s" + { + trackEvent('onboarding_hub_setup_databases'); + goto(`${base}/project-${projectId}/databases`); + }} + padding="s" >
{ + trackEvent( + 'onboarding_hub_api_references' + ); + }} target="_blank">API references { + trackEvent('onboarding_hub_tutorials'); + }} target="_blank">Tutorials { + trackEvent( + 'onboarding_hub_storage_quick_start' + ); + }} target="_blank" >Storage quick start { + trackEvent( + 'onboarding_hub_functions_quick_start' + ); + }} target="_blank" >Functions quick start @@ -458,16 +488,29 @@ { + trackEvent( + 'onboarding_hub_auth_email_password' + ); + }} >E-mail and password OAuth 2 + on:click={() => { + trackEvent( + 'onboarding_hub_auth_oauth2' + ); + }}>OAuth 2 View all methods + on:click={() => { + trackEvent( + 'onboarding_hub_auth_all_methods' + ); + }}>View all methods
- + { + trackEvent('onboarding_hub_discord'); + }}>
diff --git a/src/routes/(console)/project-[project]/overview/platforms/+page.svelte b/src/routes/(console)/project-[project]/overview/platforms/+page.svelte index f6b27c860..83943e974 100644 --- a/src/routes/(console)/project-[project]/overview/platforms/+page.svelte +++ b/src/routes/(console)/project-[project]/overview/platforms/+page.svelte @@ -8,6 +8,7 @@ import CreateReactNative from './createReactNative.svelte'; import CreateWeb from './createWeb.svelte'; import { createPlatform, versions } from './wizard/store'; + import { trackEvent } from '$lib/actions/analytics'; export enum Platform { Web, @@ -20,6 +21,10 @@ export async function addPlatform(type: Platform) { await versions.load(); createPlatform.reset(); + trackEvent('onboarding_hub_platform', { + platform: platforms[type], + state: 'add' + }); wizard.start(platforms[type]); } @@ -35,6 +40,10 @@ key: key, type: type }); + trackEvent('onboarding_hub_platform', { + platform: platforms[platform], + state: 'continue' + }); wizard.start(platforms[platform], null, 1, { isPlatformCreated: true, platform: type,