Add identifyUser

This commit is contained in:
James Salter 2021-07-21 08:38:58 +01:00
parent 74b0e52f9a
commit 4b0cb409a0
2 changed files with 22 additions and 1 deletions

View file

@ -64,6 +64,11 @@ export class PosthogAnalytics {
}
}
public async identifyUser(userId: string) {
if (this.onlyTrackAnonymousEvents) return;
this.posthog.identify(await hashHex(userId));
}
public isInitialised(): boolean {
return this.initialised;
}