Skip to content

Commit 732d1a8

Browse files
authored
fix: dont burry analytics properties (#3254)
* fix: dont burry analytics properties * chore: lint
1 parent 6419ad3 commit 732d1a8

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

pkg/analytics/posthog/posthog.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,7 @@ func (p *PosthogAnalytics) Start() {
166166
func (p *PosthogAnalytics) Identify(userId uuid.UUID, properties analytics.Properties) {
167167
err := (*p.client).Enqueue(posthog.Identify{
168168
DistinctId: analytics.DistinctID(&userId, nil, nil),
169-
Properties: posthog.Properties{
170-
"$set": properties,
171-
},
169+
Properties: posthog.Properties(properties),
172170
})
173171

174172
if err != nil {
@@ -178,11 +176,9 @@ func (p *PosthogAnalytics) Identify(userId uuid.UUID, properties analytics.Prope
178176

179177
func (p *PosthogAnalytics) Tenant(tenantId uuid.UUID, data analytics.Properties) {
180178
err := (*p.client).Enqueue(posthog.GroupIdentify{
181-
Type: "tenant",
182-
Key: tenantId.String(),
183-
Properties: posthog.Properties{
184-
"$set": data,
185-
},
179+
Type: "tenant",
180+
Key: tenantId.String(),
181+
Properties: posthog.Properties(data),
186182
})
187183
if err != nil {
188184
p.l.Error().Err(err).Str("tenant_id", tenantId.String()).Msg("error enqueuing posthog group identify")

0 commit comments

Comments
 (0)