Skip to content

Commit

Permalink
Changes in telemetry service(UserId)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyakole committed Jan 6, 2025
1 parent 2d98c62 commit b2c0f39
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/services/telemetryService.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { CsTelemetryModule } from "@project-sunbird/client-services/telemetry";
const duration = new Date().getTime();
const userId = localStorage.getItem("userId");

export const initialize = ({ did }) => {
if (!CsTelemetryModule.instance.isInitialised) {
Expand All @@ -16,7 +15,9 @@ export const initialize = ({ did }) => {
channel: process.env.REACT_APP_CHANNEL,
did: did,
authtoken: "",
uid: userId ? userId : "anonymous",
uid: localStorage.getItem("userId")
? localStorage.getItem("userId")
: "anonymous",
sid: "",
batchsize: 1,
mode: "",
Expand Down Expand Up @@ -64,7 +65,9 @@ export const getEventOptions = () => {
pid: "",
},
env: process.env.ENV,
uid: userId ? userId : "anonymous",
uid: localStorage.getItem("userId")
? localStorage.getItem("userId")
: "anonymous",
cdata: [],
rollup: {},
},
Expand Down

0 comments on commit b2c0f39

Please sign in to comment.