From 3d07e7c0859d71aec854bf87c713631009c326d1 Mon Sep 17 00:00:00 2001 From: chavda-bhavik Date: Wed, 26 Apr 2023 13:17:52 +0530 Subject: [PATCH 1/4] feat: Added basic amplitude setup --- apps/widget/.example.env | 3 +- apps/widget/craco.config.js | 1 + apps/widget/public/index.html | 3 + apps/widget/src/components/App.tsx | 14 +- .../components/Common/Container/Container.tsx | 13 +- .../widget/Phases/Phase3/Phase3.tsx | 2 + apps/widget/src/components/widget/Widget.tsx | 3 + apps/widget/src/config/app.config.ts | 2 + apps/widget/src/config/variable.config.ts | 11 + apps/widget/src/global.d.ts | 1 + apps/widget/src/hooks/Phase1/usePhase1.ts | 2 + apps/widget/src/hooks/Phase2/usePhase2.ts | 5 + apps/widget/src/hooks/Phase3/usePhase3.ts | 5 + apps/widget/src/util/amplitude/index.ts | 26 + apps/widget/tsconfig.json | 3 +- pnpm-lock.yaml | 12276 ++++++---------- 16 files changed, 4768 insertions(+), 7602 deletions(-) create mode 100644 apps/widget/src/util/amplitude/index.ts diff --git a/apps/widget/.example.env b/apps/widget/.example.env index 7666bb388..7fff6757b 100644 --- a/apps/widget/.example.env +++ b/apps/widget/.example.env @@ -1,3 +1,4 @@ REACT_APP_ENVIRONMENT=dev REACT_APP_API_URL=http://localhost:3000 -REACT_APP_SENTRY_DSN= \ No newline at end of file +REACT_APP_SENTRY_DSN= +REACT_APP_AMPLITUDE_ID= \ No newline at end of file diff --git a/apps/widget/craco.config.js b/apps/widget/craco.config.js index 05e70caae..25f498e2f 100644 --- a/apps/widget/craco.config.js +++ b/apps/widget/craco.config.js @@ -9,6 +9,7 @@ module.exports = { '@icons': path.resolve(__dirname, './src/icons/index.ts'), '@util': path.resolve(__dirname, './src/util/index.ts'), '@hooks': path.resolve(__dirname, './src/hooks'), + '@amplitude': path.resolve(__dirname, './src/util/amplitude/index.ts'), }, }, }; diff --git a/apps/widget/public/index.html b/apps/widget/public/index.html index df116ce2f..679135593 100644 --- a/apps/widget/public/index.html +++ b/apps/widget/public/index.html @@ -29,6 +29,9 @@
+