Skip to content

Commit 015d88c

Browse files
author
Artem
committed
#RI-4972 add eventData.anonymousId to all events
1 parent 51f930c commit 015d88c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

redisinsight/api/src/modules/analytics/analytics.service.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ describe('AnalyticsService', () => {
9696
integrations: { Amplitude: { session_id: sessionId } },
9797
event: TelemetryEvents.ApplicationStarted,
9898
properties: {
99+
anonymousId: mockAnonymousId,
99100
buildType: AppType.Electron,
100101
controlNumber: mockControlNumber,
101102
controlGroup: mockControlGroup,
@@ -150,7 +151,7 @@ describe('AnalyticsService', () => {
150151
integrations: { Amplitude: { session_id: sessionId } },
151152
event: TelemetryEvents.ApplicationStarted,
152153
properties: {
153-
anonymousId: undefined,
154+
anonymousId: mockAnonymousId,
154155
buildType: AppType.Electron,
155156
controlNumber: mockControlNumber,
156157
controlGroup: mockControlGroup,
@@ -186,6 +187,7 @@ describe('AnalyticsService', () => {
186187
integrations: { Amplitude: { session_id: sessionId } },
187188
name: TelemetryEvents.ApplicationStarted,
188189
properties: {
190+
anonymousId: mockAnonymousId,
189191
buildType: AppType.Electron,
190192
controlNumber: mockControlNumber,
191193
controlGroup: mockControlGroup,
@@ -240,7 +242,7 @@ describe('AnalyticsService', () => {
240242
integrations: { Amplitude: { session_id: sessionId } },
241243
name: TelemetryEvents.ApplicationStarted,
242244
properties: {
243-
anonymousId: undefined,
245+
anonymousId: mockAnonymousId,
244246
buildType: AppType.Electron,
245247
controlNumber: mockControlNumber,
246248
controlGroup: mockControlGroup,

redisinsight/api/src/modules/analytics/analytics.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class AnalyticsService {
8585
event,
8686
properties: {
8787
...eventData,
88-
anonymousId: !isAnalyticsGranted && nonTracking ? this.anonymousId : undefined,
88+
anonymousId: this.anonymousId,
8989
buildType: this.appType,
9090
controlNumber: this.controlNumber,
9191
controlGroup: this.controlGroup,
@@ -118,7 +118,7 @@ export class AnalyticsService {
118118
integrations: { Amplitude: { session_id: this.sessionId } },
119119
properties: {
120120
...eventData,
121-
anonymousId: !isAnalyticsGranted && nonTracking ? this.anonymousId : undefined,
121+
anonymousId: this.anonymousId,
122122
buildType: this.appType,
123123
controlNumber: this.controlNumber,
124124
controlGroup: this.controlGroup,

0 commit comments

Comments
 (0)