FEATURE: analytics client now scrape user email and room group
This commit is contained in:
parent
d0c0f3e7fc
commit
726f52976d
7 changed files with 20 additions and 8 deletions
|
@ -19,10 +19,10 @@ class AnalyticsClient {
|
|||
}
|
||||
}
|
||||
|
||||
identifyUser(uuid: string) {
|
||||
identifyUser(uuid: string, email: string | null) {
|
||||
this.posthogPromise
|
||||
.then((posthog) => {
|
||||
posthog.identify(uuid, { uuid, wa: true });
|
||||
posthog.identify(uuid, { uuid, email, wa: true });
|
||||
})
|
||||
.catch();
|
||||
}
|
||||
|
@ -43,10 +43,10 @@ class AnalyticsClient {
|
|||
.catch();
|
||||
}
|
||||
|
||||
enteredRoom(roomId: string) {
|
||||
enteredRoom(roomId: string, roomGroup: string | null) {
|
||||
this.posthogPromise
|
||||
.then((posthog) => {
|
||||
posthog.capture("$pageView", { roomId });
|
||||
posthog.capture("$pageView", { roomId, roomGroup });
|
||||
})
|
||||
.catch();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue