add matomo tracking

pull/3543/head
Aniket-Engg 2 years ago committed by Aniket
parent a1264db2aa
commit 4dea9f7b5b
  1. 3
      libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx

@ -8,6 +8,7 @@ import { saveAs } from 'file-saver'
import './css/style.css'
import { CustomTooltip } from '@remix-ui/helper'
const _paq = window._paq = window._paq || []
export const ContractSelection = (props: ContractSelectionProps) => {
const { api, compiledFileName, contractsDetails, contractList, compilerInput, modal } = props
@ -142,6 +143,7 @@ export const ContractSelection = (props: ContractSelectionProps) => {
}
const details = () => {
_paq.push(['trackEvent', 'compiler', 'compilerDetails', 'display'])
if (!selectedContract) throw new Error('No contract compiled yet')
const help = {
@ -185,6 +187,7 @@ export const ContractSelection = (props: ContractSelectionProps) => {
</TreeView>
</div>
const downloadFn = () => {
_paq.push(['trackEvent', 'compiler', 'compilerDetails', 'download'])
saveAs(new Blob([JSON.stringify(contractProperties, null, '\t')]), `${selectedContract}_compData.json`)
}
modal(selectedContract, log, 'Download', downloadFn, 'Close', null)

Loading…
Cancel
Save