fix: tracking error

This commit is contained in:
Arman committed 2022-11-16 16:10:43 +01:00
1 parent f21f2e2cce
commit cd2b882957
1 file changed
+5 -2
+5 -2
View File
@@ -33,8 +33,11 @@ export function trackPageView(path: string) {
}
function sendEventToGrowth(event: string, path: string, data: object = null): void {
const { email, name } = get(user);
let email: string, name: string;
if (get(user)) {
email = get(user).email;
name = get(user).name;
}
fetch('https://growth.appwrite.io/v1/analytics', {
method: 'POST',
headers: {