From 269c0687fd19c68359b4b6c436c9e909e6610220 Mon Sep 17 00:00:00 2001 From: Ansh Date: Mon, 3 Jul 2023 16:17:03 -0700 Subject: [PATCH] track successful account creation (#955) --- src/lib/analytics/types.ts | 1 + src/state/models/session.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/lib/analytics/types.ts b/src/lib/analytics/types.ts index 062149d3..83cc1422 100644 --- a/src/lib/analytics/types.ts +++ b/src/lib/analytics/types.ts @@ -12,6 +12,7 @@ interface TrackPropertiesMap { 'Sign In': {resumedSession: boolean} // CAN BE SERVER 'Create Account': {} // CAN BE SERVER 'Try Create Account': {} + 'Create Account Successfully': {} 'Signin:PressedForgotPassword': {} 'Signin:PressedSelectService': {} // COMPOSER / CREATE POST events diff --git a/src/state/models/session.ts b/src/state/models/session.ts index 57082b81..1bc722c8 100644 --- a/src/state/models/session.ts +++ b/src/state/models/session.ts @@ -11,6 +11,7 @@ import {networkRetry} from 'lib/async/retry' import {z} from 'zod' import {RootStoreModel} from './root-store' import {IS_PROD} from 'lib/constants' +import {track} from 'lib/analytics/analytics' export type ServiceDescription = DescribeServer.OutputSchema @@ -388,6 +389,7 @@ export class SessionModel { await this.setActiveSession(agent, did) this._log('SessionModel:createAccount succeeded') + track('Create Account Successfully') } /**