From b810b7cfd0c4dd16f86c2f7ae20197de462bcb3a Mon Sep 17 00:00:00 2001 From: filip mertens Date: Tue, 27 Jul 2021 09:28:38 +0200 Subject: [PATCH] fix event --- .../solidity-compiler/src/lib/compiler-container.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx index 0d40bd011c..5e25ed6dbf 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx @@ -8,6 +8,14 @@ import { resetEditorMode, listenToEvents } from './actions/compiler' import './css/style.css' +declare global { + interface Window { + _paq: any + } +} + +const _paq = window._paq = window._paq || [] //eslint-disable-line + export const CompilerContainer = (props: CompilerContainerProps) => { const { editor, config, queryParams, compileTabLogic, tooltip, modal, compiledFileName, setHardHatCompilation, updateCurrentVersion, isHardHatProject, configurationSettings } = props // eslint-disable-line const [state, setState] = useState({ @@ -272,6 +280,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { compileIcon.current.setAttribute('title', 'idle') compileIcon.current.classList.remove('remixui_spinningIcon') compileIcon.current.classList.remove('remixui_bouncingIcon') + _paq.push(['trackEvent', 'compiler', 'compiled_with_version', _retrieveVersion()]) } const scheduleCompilation = () => {