Skip to content

Commit 4b7ac36

Browse files
authored
Merge pull request #2968 from ethereum/matomo_listen_framework
matomo: listen on framework
2 parents 0e16b82 + 8d6a0ed commit 4b7ac36

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

libs/remix-ui/run-tab/src/lib/actions/events.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { addDeployOption, clearAllInstances, clearRecorderCount, fetchContractLi
66
import { CompilerAbstract } from '@remix-project/remix-solidity'
77
import * as ethJSUtil from 'ethereumjs-util'
88
import Web3 from 'web3'
9+
const _paq = window._paq = window._paq || []
910

1011
export const setupEvents = (plugin: RunTab, dispatch: React.Dispatch<any>) => {
1112
plugin.blockchain.events.on('newTransaction', (tx, receipt) => {
@@ -99,6 +100,7 @@ export const setupEvents = (plugin: RunTab, dispatch: React.Dispatch<any>) => {
99100
}
100101

101102
const broadcastCompilationResult = async (compilerName: string, plugin: RunTab, dispatch: React.Dispatch<any>, file, source, languageVersion, data, input?) => {
103+
_paq.push(['trackEvent', 'udapp', 'broadcastCompilationResult', compilerName])
102104
// TODO check whether the tab is configured
103105
const compiler = new CompilerAbstract(languageVersion, data, source, input)
104106
plugin.compilersArtefacts[languageVersion] = compiler

libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import * as ethJSUtil from 'ethereumjs-util'
66
import { ContractGUI } from './contractGUI'
77
import { deployWithProxyMsg, upgradeWithProxyMsg } from '@remix-ui/helper'
88
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
9+
const _paq = window._paq = window._paq || []
910

1011
export function ContractDropdownUI (props: ContractDropdownProps) {
1112
const [abiLabel, setAbiLabel] = useState<{
@@ -248,7 +249,10 @@ export function ContractDropdownUI (props: ContractDropdownProps) {
248249
<div>This action is enabled when Remix is connected to an external framework (hardhat, truffle, foundry) through remixd.</div>
249250
</Tooltip>
250251
}>
251-
<button className="btn d-flex py-0" onClick={_ => props.syncContracts()}>
252+
<button className="btn d-flex py-0" onClick={_ => {
253+
props.syncContracts()
254+
_paq.push(['trackEvent', 'udapp', 'syncContracts', compilationSource])
255+
}}>
252256
<i style={{ cursor: 'pointer' }} className="fa fa-refresh mr-2 mt-2" aria-hidden="true"></i>
253257
</button>
254258
</OverlayTrigger>

0 commit comments

Comments
 (0)