Skip to content

Commit c01d9a5

Browse files
committed
fix: events
1 parent 177eaa3 commit c01d9a5

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/routes/(public)/(guest)/login/+page.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@
3232
}
3333
3434
if (data?.couponData?.code) {
35-
trackEvent(Submit.AccountCreate, { campaign_name: data?.couponData?.code });
35+
trackEvent(Submit.AccountCreate, {
36+
campaign_name: data?.couponData?.code,
37+
email: mail,
38+
name: $user?.name
39+
});
3640
await goto(`${base}/apply-credit?code=${data?.couponData?.code}`);
3741
return;
3842
}

src/routes/(public)/(guest)/register/+page.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@
3232
await sdk.forConsole.account.create(ID.unique(), mail, pass, name ?? '');
3333
await sdk.forConsole.account.createEmailPasswordSession(mail, pass);
3434
35-
trackEvent(Submit.AccountCreate, { campaign_name: data?.couponData?.code });
35+
trackEvent(Submit.AccountCreate, {
36+
campaign_name: data?.couponData?.code,
37+
email: mail,
38+
name: name
39+
});
3640
3741
if (data?.couponData?.code) {
3842
await goto(`${base}/apply-credit?code=${data?.couponData?.code}`);

src/routes/(public)/(guest)/register/invite/[slug]/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import { sdk } from '$lib/stores/sdk';
1414
import { Unauthenticated } from '$lib/layout';
1515
import { Dependencies } from '$lib/constants';
16-
import { trackEvent } from '$lib/actions/analytics';
16+
import { Submit, trackEvent } from '$lib/actions/analytics';
1717
import { onMount } from 'svelte';
1818
import { page } from '$app/state';
1919
import LoginLight from '$lib/images/login/login-light-mode.svg';
@@ -77,7 +77,7 @@
7777
await sdk.forConsole.account.updatePrefs(newPrefs);
7878
await invalidate(Dependencies.ACCOUNT);
7979
await goto(base);
80-
trackEvent('submit_account_create', {
80+
trackEvent(Submit.AccountCreate, {
8181
email: mail,
8282
name: name,
8383
code: code

0 commit comments

Comments
 (0)