Skip to content

Commit 7b192d4

Browse files
committed
fix(create-gatsby) the sessionIs is supposed to be the same for the whole duration of the session
1 parent 930e6b6 commit 7b192d4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/create-gatsby/src/tracking.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ export interface ITrackCliArgs {
2626
siteHash?: string
2727
}
2828

29+
const sessionId = uuidv4()
30+
2931
export const trackCli = (eventType: string, args?: ITrackCliArgs): void => {
3032
fetch(analyticsApi, {
3133
method: `POST`,
@@ -36,7 +38,7 @@ export const trackCli = (eventType: string, args?: ITrackCliArgs): void => {
3638
body: JSON.stringify({
3739
eventType,
3840
time: new Date(),
39-
sessionId: uuidv4(),
41+
sessionId: sessionId,
4042
machineId: getMachineId(),
4143
componentId: `create-gatsby`,
4244
componentVersion: 1,

0 commit comments

Comments
 (0)