diff --git a/apps/remix-ide/src/app/components/preload.tsx b/apps/remix-ide/src/app/components/preload.tsx index 0aade77f75..f599f9f8b3 100644 --- a/apps/remix-ide/src/app/components/preload.tsx +++ b/apps/remix-ide/src/app/components/preload.tsx @@ -34,7 +34,7 @@ export const Preload = () => { ) }) }).catch(err => { - _paq.push(['_trackEvent', 'Preload', 'error', err && err.message]) + _paq.push(['trackEvent', 'Preload', 'error', err && err.message]) console.log('Error loading Remix:', err) setError(true) }) @@ -51,7 +51,7 @@ export const Preload = () => { setShowDownloader(false) const fsUtility = new fileSystemUtility() const migrationResult = await fsUtility.migrate(localStorageFileSystem.current, remixIndexedDB.current) - _paq.push(['_trackEvent', 'Migrate', 'result', migrationResult?'success' : 'fail']) + _paq.push(['trackEvent', 'Migrate', 'result', migrationResult?'success' : 'fail']) await setFileSystems() } @@ -59,10 +59,10 @@ export const Preload = () => { const fsLoaded = await remixFileSystems.current.setFileSystem([(testmigrationFallback.current || testBlockStorage.current)? null: remixIndexedDB.current, testBlockStorage.current? null:localStorageFileSystem.current]) if (fsLoaded) { console.log(fsLoaded.name + ' activated') - _paq.push(['_trackEvent', 'Storage', 'activate', fsLoaded.name]) + _paq.push(['trackEvent', 'Storage', 'activate', fsLoaded.name]) loadAppComponent() } else { - _paq.push(['_trackEvent', 'Storage', 'error', 'no supported storage']) + _paq.push(['trackEvent', 'Storage', 'error', 'no supported storage']) setSupported(false) } } @@ -76,8 +76,8 @@ export const Preload = () => { useEffect(() => { async function loadStorage() { - await remixFileSystems.current.addFileSystem(remixIndexedDB.current) || _paq.push(['_trackEvent', 'Storage', 'error', 'indexedDB not supported']) - await remixFileSystems.current.addFileSystem(localStorageFileSystem.current) || _paq.push(['_trackEvent', 'Storage', 'error', 'localstorage not supported']) + await remixFileSystems.current.addFileSystem(remixIndexedDB.current) || _paq.push(['trackEvent', 'Storage', 'error', 'indexedDB not supported']) + await remixFileSystems.current.addFileSystem(localStorageFileSystem.current) || _paq.push(['trackEvent', 'Storage', 'error', 'localstorage not supported']) await testmigration() remixIndexedDB.current.loaded && await remixIndexedDB.current.checkWorkspaces() localStorageFileSystem.current.loaded && await localStorageFileSystem.current.checkWorkspaces() diff --git a/apps/remix-ide/src/app/files/filesystems/fileSystemUtility.ts b/apps/remix-ide/src/app/files/filesystems/fileSystemUtility.ts index 0873a7d288..1b927a01e0 100644 --- a/apps/remix-ide/src/app/files/filesystems/fileSystemUtility.ts +++ b/apps/remix-ide/src/app/files/filesystems/fileSystemUtility.ts @@ -26,14 +26,14 @@ export class fileSystemUtility { console.log('file migration successful') return true } else { - _paq.push(['_trackEvent', 'Migrate', 'error', 'hash mismatch']) + _paq.push(['trackEvent', 'Migrate', 'error', 'hash mismatch']) console.log('file migration failed falling back to ' + fsFrom.name) fsTo.loaded = false return false } } catch (err) { console.log(err) - _paq.push(['_trackEvent', 'Migrate', 'error', err && err.message]) + _paq.push(['trackEvent', 'Migrate', 'error', err && err.message]) console.log('file migration failed falling back to ' + fsFrom.name) fsTo.loaded = false return false @@ -52,9 +52,9 @@ export class fileSystemUtility { const date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate() const time = today.getHours() + 'h' + today.getMinutes() + 'min' this.saveAs(blob, `remix-backup-at-${time}-${date}.zip`) - _paq.push(['_trackEvent','Backup','download','preload']) + _paq.push(['trackEvent','Backup','download','preload']) } catch (err) { - _paq.push(['_trackEvent','Backup','error',err && err.message]) + _paq.push(['trackEvent','Backup','error',err && err.message]) console.log(err) } } diff --git a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx index d203a873a9..32d1e69c3b 100644 --- a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx +++ b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx @@ -206,9 +206,9 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => { const date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate() const time = today.getHours() + 'h' + today.getMinutes() + 'min' saveAs(blob, `remix-backup-at-${time}-${date}.zip`) - _paq.push(['_trackEvent', 'Backup', 'download', 'home']) + _paq.push(['trackEvent', 'Backup', 'download', 'home']) }).catch((e) => { - _paq.push(['_trackEvent', 'Backup', 'error', e.message]) + _paq.push(['trackEvent', 'Backup', 'error', e.message]) plugin.call('notification', 'toast', e.message) }) } catch (e) {