@@ -33,7 +33,9 @@ import launchMongoShell from './commands/launchMongoShell';
3333import type SchemaTreeItem from './explorer/schemaTreeItem' ;
3434import { StatusView } from './views' ;
3535import { StorageController , StorageVariables } from './storage' ;
36- import TelemetryService from './telemetry/telemetryService' ;
36+ import TelemetryService , {
37+ TelemetryEventTypes ,
38+ } from './telemetry/telemetryService' ;
3739import type PlaygroundsTreeItem from './explorer/playgroundsTreeItem' ;
3840import PlaygroundResultProvider from './editors/playgroundResultProvider' ;
3941import WebviewController from './views/webviewController' ;
@@ -823,7 +825,7 @@ export default class MDBExtensionController implements vscode.Disposable {
823825 this . _storageController . get ( StorageVariables . GLOBAL_SURVEY_SHOWN ) ===
824826 surveyId ;
825827
826- // Show the overview page when it hasn't been show to the
828+ // Show the survey when it hasn't been show to the
827829 // user yet, and they have saved connections
828830 // -> they haven't just started using this extension
829831 if (
@@ -845,6 +847,13 @@ export default class MDBExtensionController implements vscode.Disposable {
845847 ) ;
846848 if ( result ?. title === action ) {
847849 void vscode . env . openExternal ( vscode . Uri . parse ( link ) ) ;
850+ this . _telemetryService . track ( TelemetryEventTypes . SURVEY_CLICKED , {
851+ survey_id : surveyId ,
852+ } ) ;
853+ } else {
854+ this . _telemetryService . track ( TelemetryEventTypes . SURVEY_DISMISSED , {
855+ survey_id : surveyId ,
856+ } ) ;
848857 }
849858
850859 // whether action was taken or the prompt dismissed, we won't show this again
0 commit comments