Skip to content

Commit

Permalink
f: fix latest warning, add tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
mustard-mh committed Apr 21, 2022
1 parent ad17be1 commit 6192dd1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions components/server/src/workspace/workspace-starter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ export class WorkspaceStarter {
log.info({ choose }, "ide choose");
configuration.ideImage = choose.ideImage;
configuration.desktopIdeImage = choose.desktopIdeImage;
configuration.ideConfig!.useLatest = workspace.context.useLatest ?? false;
}

const referrerIde = this.resolveReferrerIDE(workspace, user, ideConfig);
Expand Down Expand Up @@ -718,6 +719,18 @@ export class WorkspaceStarter {
referrerIde: workspace.context.referrerIde,
},
});
} else if (WithEditorContext.is(workspace.context)) {
this.analytics.track({
userId: user.id,
event: "custom_editor_referrer",
properties: {
workspaceId: workspace.id,
instanceId: instance.id,
ide: workspace.context.ide,
referrer: workspace.context.referrer,
useLatest: workspace.context.useLatest,
},
});
}
return instance;
}
Expand Down

0 comments on commit 6192dd1

Please sign in to comment.