From b4b96375b36b268f9bcff41f71e8368ec458e07c Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Tue, 31 Jan 2023 15:11:29 +0100 Subject: [PATCH] feat: add events for creating platforms --- .../overview/platforms/wizard/android/step1.svelte | 5 +++++ .../overview/platforms/wizard/apple/step1.svelte | 5 +++++ .../overview/platforms/wizard/flutter/step1.svelte | 5 +++++ .../overview/platforms/wizard/web/step1.svelte | 6 ++++++ 4 files changed, 21 insertions(+) diff --git a/src/routes/console/project-[project]/overview/platforms/wizard/android/step1.svelte b/src/routes/console/project-[project]/overview/platforms/wizard/android/step1.svelte index 7971b24e68..8b903523e0 100644 --- a/src/routes/console/project-[project]/overview/platforms/wizard/android/step1.svelte +++ b/src/routes/console/project-[project]/overview/platforms/wizard/android/step1.svelte @@ -8,6 +8,7 @@ import { app } from '$lib/stores/app'; import Light from './light.svg'; import Dark from './dark.svg'; + import { trackEvent } from '$lib/actions/analytics'; $wizard.media = $app.themeInUse === 'dark' ? Dark : Light; @@ -36,6 +37,10 @@ undefined ); + trackEvent('submit_platform_create', { + type: 'android' + }); + $createPlatform.$id = platform.$id; } diff --git a/src/routes/console/project-[project]/overview/platforms/wizard/apple/step1.svelte b/src/routes/console/project-[project]/overview/platforms/wizard/apple/step1.svelte index 49cdcd687f..b472fc121e 100644 --- a/src/routes/console/project-[project]/overview/platforms/wizard/apple/step1.svelte +++ b/src/routes/console/project-[project]/overview/platforms/wizard/apple/step1.svelte @@ -9,6 +9,7 @@ import { app } from '$lib/stores/app'; import Light from './light.svg'; import Dark from './dark.svg'; + import { trackEvent } from '$lib/actions/analytics'; $wizard.media = $app.themeInUse === 'dark' ? Dark : Light; @@ -46,6 +47,10 @@ undefined ); + trackEvent('submit_platform_create', { + type: platform + }); + $createPlatform.$id = response.$id; } diff --git a/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step1.svelte b/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step1.svelte index 82a356e4cc..c804b2f57e 100644 --- a/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step1.svelte +++ b/src/routes/console/project-[project]/overview/platforms/wizard/flutter/step1.svelte @@ -10,6 +10,7 @@ import { app } from '$lib/stores/app'; import Light from './light.svg'; import Dark from './dark.svg'; + import { trackEvent } from '$lib/actions/analytics'; $wizard.media = $app.themeInUse === 'dark' ? Dark : Light; @@ -102,6 +103,10 @@ platform === Platform.Web ? $createPlatform.hostname : undefined ); + trackEvent('submit_platform_create', { + type: platform + }); + $createPlatform.$id = response.$id; } diff --git a/src/routes/console/project-[project]/overview/platforms/wizard/web/step1.svelte b/src/routes/console/project-[project]/overview/platforms/wizard/web/step1.svelte index 5a3e555da8..12d9fcccde 100644 --- a/src/routes/console/project-[project]/overview/platforms/wizard/web/step1.svelte +++ b/src/routes/console/project-[project]/overview/platforms/wizard/web/step1.svelte @@ -10,6 +10,7 @@ import { app } from '$lib/stores/app'; import Light from './light.svg'; import Dark from './dark.svg'; + import { trackEvent } from '$lib/actions/analytics'; const projectId = $page.params.project; const suggestions = ['*.vercel.app', '*.netlify.app', '*.gitpod.io']; @@ -37,6 +38,11 @@ undefined, $createPlatform.hostname ); + + trackEvent('submit_platform_create', { + type: 'web' + }); + $createPlatform.$id = platform.$id; }