Skip to content

Commit de87590

Browse files
jamoascorbic
andauthored
fix(create-gatsby) the sessionId is supposed to be the same for the whole duration of the session (#28864)
* fix(create-gatsby) the sessionIs is supposed to be the same for the whole duration of the session * Update packages/create-gatsby/src/tracking.ts Co-authored-by: Matt Kane <[email protected]> Co-authored-by: Matt Kane <[email protected]>
1 parent a135c50 commit de87590

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,
4042
machineId: getMachineId(),
4143
componentId: `create-gatsby`,
4244
componentVersion: 1,

0 commit comments

Comments
 (0)