diff --git a/pkg/query-service/telemetry/telemetry.go b/pkg/query-service/telemetry/telemetry.go index 8f85591c91..d632ab03a3 100644 --- a/pkg/query-service/telemetry/telemetry.go +++ b/pkg/query-service/telemetry/telemetry.go @@ -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 {