fix: minor changes

This commit is contained in:
Ankit Nayan 2023-01-07 02:31:54 +05:30
parent 16a49a8b04
commit 4841f150f4

View File

@ -37,6 +37,7 @@ const (
TELEMETRY_EVENT_DISTRIBUTED = "Distributed"
TELEMETRY_EVENT_DASHBOARDS_METADATA = "Dashboards Metadata"
TELEMETRY_EVENT_ACTIVE_USER = "Active User"
TELEMETRY_EVENT_ACTIVE_USER_PH = "Active User V2"
)
const api_key = "4Gmoa4ixJAUHx2BpJxsjwA1bEfnwEeRz"
@ -329,6 +330,17 @@ func (a *Telemetry) SendEvent(event string, data map[string]interface{}, opts ..
})
}
if event == TELEMETRY_EVENT_ACTIVE_USER {
a.phOperator.Enqueue(ph.Capture{
DistinctId: userId,
Event: TELEMETRY_EVENT_ACTIVE_USER_PH,
Properties: ph.Properties(properties),
Groups: ph.NewGroups().
Set("companyDomain", a.getCompanyDomain()),
})
}
}
func (a *Telemetry) GetDistinctId() string {