feat(create-medusa-app): add tracking for selected options (#5404)

Adds tracking for selected options in `create-medusa-app` to better understand how users are using Medusa.
This commit is contained in:
Shahed Nasser
2023-10-18 12:02:40 +03:00
committed by GitHub
parent 04e9dd6a6a
commit a1807aea83
2 changed files with 16 additions and 7 deletions

View File

@@ -0,0 +1,5 @@
---
"create-medusa-app": patch
---
feat(create-medusa-app): add tracking for selected options

View File

@@ -55,13 +55,7 @@ export default async ({
directoryPath,
withNextjsStarter = false,
}: CreateOptions) => {
track("CREATE_CLI")
if (repoUrl) {
track("STARTER_SELECTED", { starter: repoUrl })
}
if (seed) {
track("SEED_SELECTED", { seed })
}
track("CREATE_CLI_CMA")
const spinner: Ora = ora()
const processManager = new ProcessManager()
@@ -111,6 +105,16 @@ export default async ({
: { client: null, dbConnectionString: "" }
isDbInitialized = true
track("CMA_OPTIONS", {
repoUrl,
seed,
boilerplate,
skipDb,
browser,
migrations,
installNextjs,
})
logMessage({
message: `${emojify(
":rocket:"