@@ -239,12 +239,10 @@ export const populateWorkspace = async (
239239 if ( workspaceTemplateName === 'semaphore' || workspaceTemplateName === 'hashchecker' || workspaceTemplateName === 'rln' ) {
240240 const isCircomActive = await plugin . call ( 'manager' , 'isActive' , 'circuit-compiler' )
241241 if ( ! isCircomActive ) await plugin . call ( 'manager' , 'activatePlugin' , 'circuit-compiler' )
242- await trackMatomoEventAsync ( plugin , { category : 'compiler' , action : 'compiled' , name : workspaceTemplateName , isClick : false } )
243242 }
244243 if ( workspaceTemplateName === 'multNr' || workspaceTemplateName === 'stealthDropNr' ) {
245244 const isNoirActive = await plugin . call ( 'manager' , 'isActive' , 'noir-compiler' )
246245 if ( ! isNoirActive ) await plugin . call ( 'manager' , 'activatePlugin' , 'noir-compiler' )
247- await trackMatomoEventAsync ( plugin , { category : 'compiler' , action : 'compiled' , name : workspaceTemplateName , isClick : false } )
248246 }
249247}
250248
@@ -301,15 +299,15 @@ export const loadWorkspacePreset = async (template: WorkspaceTemplate = 'remixDe
301299 let content
302300
303301 if ( params . code ) {
304- await trackMatomoEventAsync ( plugin , { category : 'Workspace' , action : 'switchWorkspace ' , name : 'code-template-code-param' , isClick : false } )
302+ await trackMatomoEventAsync ( plugin , { category : 'Workspace' , action : 'template ' , name : 'code-template-code-param' , isClick : false } )
305303 const hashed = bytesToHex ( hash . keccakFromString ( params . code ) )
306304
307305 path = 'contract-' + hashed . replace ( '0x' , '' ) . substring ( 0 , 10 ) + ( params . language && params . language . toLowerCase ( ) === 'yul' ? '.yul' : '.sol' )
308306 content = decodePercentEscapedBase64 ( params . code )
309307 await workspaceProvider . set ( path , content )
310308 }
311309 if ( params . shareCode ) {
312- await trackMatomoEventAsync ( plugin , { category : 'Workspace' , action : 'switchWorkspace ' , name : 'code-template-shareCode-param' , isClick : false } )
310+ await trackMatomoEventAsync ( plugin , { category : 'Workspace' , action : 'template ' , name : 'code-template-shareCode-param' , isClick : false } )
313311 const host = '127.0.0.1'
314312 const port = 5001
315313 const protocol = 'http'
@@ -334,7 +332,7 @@ export const loadWorkspacePreset = async (template: WorkspaceTemplate = 'remixDe
334332 await workspaceProvider . set ( path , content )
335333 }
336334 if ( params . url ) {
337- await trackMatomoEventAsync ( plugin , { category : 'Workspace' , action : 'switchWorkspace ' , name : 'code-template-url-param' , isClick : false } )
335+ await trackMatomoEventAsync ( plugin , { category : 'Workspace' , action : 'template ' , name : 'code-template-url-param' , isClick : false } )
338336 const data = await plugin . call ( 'contentImport' , 'resolve' , params . url )
339337 path = data . cleanUrl
340338 content = data . content
@@ -358,7 +356,7 @@ export const loadWorkspacePreset = async (template: WorkspaceTemplate = 'remixDe
358356 }
359357 if ( params . ghfolder ) {
360358 try {
361- await trackMatomoEventAsync ( plugin , { category : 'Workspace' , action : 'switchWorkspace ' , name : 'code-template-ghfolder-param' , isClick : false } )
359+ await trackMatomoEventAsync ( plugin , { category : 'Workspace' , action : 'template ' , name : 'code-template-ghfolder-param' , isClick : false } )
362360 const files = await plugin . call ( 'contentImport' , 'resolveGithubFolder' , params . ghfolder )
363361 for ( const [ path , content ] of Object . entries ( files ) ) {
364362 await workspaceProvider . set ( path , content )
@@ -377,7 +375,7 @@ export const loadWorkspacePreset = async (template: WorkspaceTemplate = 'remixDe
377375 case 'gist-template' :
378376 // creates a new workspace gist-sample and get the file from gist
379377 try {
380- await trackMatomoEventAsync ( plugin , { category : 'Workspace' , action : 'switchWorkspace ' , name : 'gist-template' , isClick : false } )
378+ await trackMatomoEventAsync ( plugin , { category : 'Workspace' , action : 'template ' , name : 'gist-template' , isClick : false } )
381379 const gistId = params . gist
382380 const response : AxiosResponse = await axios . get ( `https://api.github.com/gists/${ gistId } ` )
383381 const data = response . data as { files : any }
@@ -440,7 +438,7 @@ export const loadWorkspacePreset = async (template: WorkspaceTemplate = 'remixDe
440438 const templateList = Object . keys ( templateWithContent )
441439 if ( ! templateList . includes ( template ) ) break
442440
443- await trackMatomoEventAsync ( plugin , { category : 'Workspace' , action : 'switchWorkspace ' , name : template , isClick : false } )
441+ await trackMatomoEventAsync ( plugin , { category : 'Workspace' , action : 'template ' , name : template , isClick : false } )
444442 // @ts -ignore
445443 const files = await templateWithContent [ template ] ( opts , plugin )
446444 for ( const file in files ) {
0 commit comments