From 1e550d743036540dfb47c2e50584ad806df92146 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 3 Oct 2022 08:07:56 +0200 Subject: [PATCH] add matomo --- libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx b/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx index 4bca319f0e..07f66efff3 100644 --- a/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx +++ b/libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx @@ -5,6 +5,7 @@ import React, { useState, useRef, useEffect, useReducer } from 'react' // eslint import { OverlayTrigger, Tooltip } from 'react-bootstrap' // eslint-disable-line import { Tab, Tabs, TabList, TabPanel } from 'react-tabs' import './remix-ui-tabs.css' +const _paq = window._paq = window._paq || [] /* eslint-disable-next-line */ export interface TabsUIProps { @@ -152,8 +153,10 @@ export const TabsUI = (props: TabsUIProps) => { const content = await props.plugin.call('fileManager', "readFile", path) if (tabsState.currentExt === 'js' || tabsState.currentExt === 'ts') { await props.plugin.call('scriptRunner', 'execute', content) + _paq.push(['trackEvent', 'editor', 'clickRunFromEditor', tabsState.currentExt]) } else if (tabsState.currentExt === 'sol' || tabsState.currentExt === 'yul') { await props.plugin.call('solidity', 'compile', path) + _paq.push(['trackEvent', 'editor', 'clickRunFromEditor', tabsState.currentExt]) } }} >