mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-24 20:40:59 +00:00
Add group analytics to track workspace activity; replace setTag() call with setWorkspace() when adding workspace tag to person properties (#5519)
Signed-off-by: Abigail Dawson <abigaildawson.dev@gmail.com>
This commit is contained in:
parent
096bfacad7
commit
d99d0c6cbb
@ -113,11 +113,11 @@ export async function connect (title: string): Promise<Client | undefined> {
|
||||
)
|
||||
console.log('logging in as guest')
|
||||
Analytics.handleEvent('GUEST LOGIN')
|
||||
Analytics.setTag('workspace', ws)
|
||||
Analytics.setWorkspace(ws)
|
||||
const me = await _client?.getAccount()
|
||||
if (me !== undefined) {
|
||||
Analytics.setUser(me.email)
|
||||
Analytics.setTag('workspace', ws)
|
||||
Analytics.setWorkspace(ws)
|
||||
console.log('login: employee account', me)
|
||||
setCurrentAccount(me)
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ export async function createWorkspace (
|
||||
const result = await response.json()
|
||||
if (result.error == null) {
|
||||
Analytics.handleEvent('create workspace')
|
||||
Analytics.setTag('workspace', workspaceName)
|
||||
Analytics.setWorkspace(workspaceName)
|
||||
} else {
|
||||
await handleStatusError('Create workspace error', result.error)
|
||||
}
|
||||
@ -337,7 +337,7 @@ export async function selectWorkspace (workspace: string): Promise<[Status, Work
|
||||
const result = await response.json()
|
||||
if (result.error == null) {
|
||||
Analytics.handleEvent('Select workspace')
|
||||
Analytics.setTag('workspace', workspace)
|
||||
Analytics.setWorkspace(workspace)
|
||||
} else {
|
||||
await handleStatusError('Select workspace error', result.error)
|
||||
}
|
||||
@ -386,7 +386,7 @@ export async function fetchWorkspace (workspace: string): Promise<[Status, Works
|
||||
const result = await response.json()
|
||||
if (result.error == null) {
|
||||
Analytics.handleEvent('Fetch workspace')
|
||||
Analytics.setTag('workspace', workspace)
|
||||
Analytics.setWorkspace(workspace)
|
||||
} else {
|
||||
await handleStatusError('Fetch workspace error', result.error)
|
||||
}
|
||||
@ -433,7 +433,7 @@ export async function createMissingEmployee (workspace: string): Promise<[Status
|
||||
const result = await response.json()
|
||||
if (result.error == null) {
|
||||
Analytics.handleEvent('Create missing employee')
|
||||
Analytics.setTag('workspace', workspace)
|
||||
Analytics.setWorkspace(workspace)
|
||||
} else {
|
||||
await handleStatusError('Fetch workspace error', result.error)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user