Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit e3270ef

Browse files
committed
add anonymousId to tracking
1 parent 0eb632d commit e3270ef

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

api_server/modules/analytics/analytics_client.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,13 @@ class AnalyticsClient {
3737
properties: data,
3838
messageId: UUID(),
3939
timestamp: new Date(),
40-
type: "track"
40+
type: "track",
41+
anonymousId: UUID()
4142
};
4243
const nrUserId = options.user ? options.user.get('nrUserId') : options.nrUserId;
4344
if (nrUserId) {
4445
trackData.userId = nrUserId; //userId;
4546
}
46-
if (options.anonymousId) {
47-
trackData.anonymousId = options.anonymousId;
48-
}
4947

5048
if (this._requestSaysToTestTracking(options)) {
5149
// we received a header in the request asking us to divert this tracking event

0 commit comments

Comments
 (0)