From c2945f11b74cd1a00a13e6ceb51105d8463e6dc6 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Thu, 16 Jun 2022 10:45:44 -0500 Subject: [PATCH] track create user --- functions/src/create-user.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/src/create-user.ts b/functions/src/create-user.ts index 51e73c36..09b1e638 100644 --- a/functions/src/create-user.ts +++ b/functions/src/create-user.ts @@ -15,6 +15,7 @@ import { } from '../../common/util/clean-username' import { sendWelcomeEmail } from './emails' import { isWhitelisted } from '../../common/envs/constants' +import { track } from './analytics' export const createUser = functions .runWith({ minInstances: 1, secrets: ['MAILGUN_KEY'] }) @@ -86,6 +87,8 @@ export const createUser = functions await sendWelcomeEmail(user, privateUser) + await track(userId, 'create user', { username }, { ip: ipAddress }) + return { status: 'success', user } })