Skip to content

Commit

Permalink
feat: add dev environment for GA
Browse files Browse the repository at this point in the history
  • Loading branch information
OKendigelyan authored and ajinkyaraj-23 committed Feb 25, 2025
1 parent 45826c9 commit b8b3f60
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dist/
# misc
.DS_Store
.env.local
.env.development
.env.development.local
.env.test.local
.env.production.local
Expand Down
9 changes: 6 additions & 3 deletions apps/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@
<title>Umami</title>
<!-- Google Analytics tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-82XSMBDYTJ"></script>
<script>
<script type="module">
const measurementId =
process.env.NODE_ENV === "development" ? "G-GYN15SE904" : "G-82XSMBDYTJ";

window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
window.gtag = gtag;
gtag("js", new Date());

gtag("config", "G-82XSMBDYTJ");
gtag("config", measurementId);
</script>
</head>
<body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,11 @@ export const useGetSetupPasswordSubmitHandler = (mode: Mode) => {
case "mnemonic":
case "new_mnemonic":
case "add_account": {
trackOnboardingEvent(`create_account_with_${mode}`);
if (mode === "mnemonic" || mode === "new_mnemonic") {
trackOnboardingEvent(`create_account_with_${mode}`);
}

await handleMnemonic(formValues, isNewMnemonic);

break;
}
case "verification": {
Expand Down

0 comments on commit b8b3f60

Please sign in to comment.