added tracking for Deploy, LL calls, At Address, Transact, Publish Metada

pull/5370/head
lianahus 4 years ago committed by Liana Husikyan
parent 3f2ff6e064
commit fc1d628d8b
  1. 5
      apps/remix-ide/src/app/tabs/runTab/contractDropdown.js
  2. 11
      apps/remix-ide/src/app/tabs/runTab/model/dropdownlogic.js
  3. 2
      apps/remix-ide/src/app/udapp/run-tab.js
  4. 2
      apps/remix-ide/src/app/ui/universal-dapp-ui.js

@ -306,10 +306,10 @@ class ContractDropdownUI {
const data = self.runView.compilersArtefacts.getCompilerAbstract(contractObject.contract.file) const data = self.runView.compilersArtefacts.getCompilerAbstract(contractObject.contract.file)
self.runView.compilersArtefacts.addResolvedContract(helper.addressToString(address), data) self.runView.compilersArtefacts.addResolvedContract(helper.addressToString(address), data)
if (self.ipfsCheckedState) { if (self.ipfsCheckedState) {
_paq.push(['trackEvent', 'udapp', `ipfsPublishTo_${this.networkName}`]) _paq.push(['trackEvent', 'udapp', `DeployAndPublish_${this.networkName}`])
publishToStorage('ipfs', self.runView.fileProvider, self.runView.fileManager, selectedContract) publishToStorage('ipfs', self.runView.fileProvider, self.runView.fileManager, selectedContract)
} else { } else {
_paq.push(['trackEvent', 'udapp', 'ipfsPublishNotChecked']) _paq.push(['trackEvent', 'udapp', 'DeployOnly'])
} }
} }
@ -399,6 +399,7 @@ class ContractDropdownUI {
return modalDialogCustom.alert(error) return modalDialogCustom.alert(error)
} }
if (loadType === 'abi') { if (loadType === 'abi') {
_paq.push(['trackEvent', 'udapp', 'AtAddressFromABI'])
return this.event.trigger('newContractABIAdded', [abi, address]) return this.event.trigger('newContractABIAdded', [abi, address])
} }
var selectedContract = this.getSelectedContract() var selectedContract = this.getSelectedContract()

@ -1,7 +1,8 @@
var remixLib = require('@remix-project/remix-lib') const remixLib = require('@remix-project/remix-lib')
var txHelper = remixLib.execution.txHelper const txHelper = remixLib.execution.txHelper
var CompilerAbstract = require('../../../compiler/compiler-abstract') const CompilerAbstract = require('../../../compiler/compiler-abstract')
var EventManager = remixLib.EventManager const EventManager = remixLib.EventManager
const _paq = window._paq = window._paq || []
class DropdownLogic { class DropdownLogic {
constructor (compilersArtefacts, config, editor, runView) { constructor (compilersArtefacts, config, editor, runView) {
@ -50,9 +51,11 @@ class DropdownLogic {
} catch (e) { } catch (e) {
return cb('Failed to parse the current file as JSON ABI.') return cb('Failed to parse the current file as JSON ABI.')
} }
_paq.push(['trackEvent', 'udapp', 'AtAddressLoadWithABI'])
cb(null, 'abi', abi) cb(null, 'abi', abi)
}) })
} else { } else {
_paq.push(['trackEvent', 'udapp', 'AtAddressLoadWithInstance'])
cb(null, 'instance') cb(null, 'instance')
} }
} }

@ -15,6 +15,7 @@ const RecorderUI = require('../tabs/runTab/recorder.js')
const DropdownLogic = require('../tabs/runTab/model/dropdownlogic.js') const DropdownLogic = require('../tabs/runTab/model/dropdownlogic.js')
const ContractDropdownUI = require('../tabs/runTab/contractDropdown.js') const ContractDropdownUI = require('../tabs/runTab/contractDropdown.js')
const toaster = require('../ui/tooltip') const toaster = require('../ui/tooltip')
const _paq = window._paq = window._paq || []
const UniversalDAppUI = require('../ui/universal-dapp-ui') const UniversalDAppUI = require('../ui/universal-dapp-ui')
@ -91,6 +92,7 @@ export class RunTab extends ViewPlugin {
} }
sendTransaction (tx) { sendTransaction (tx) {
_paq.push(['trackEvent', 'udapp', 'sendTx'])
return this.blockchain.sendTransaction(tx) return this.blockchain.sendTransaction(tx)
} }

@ -14,6 +14,7 @@ var txFormat = remixLib.execution.txFormat
const txHelper = remixLib.execution.txHelper const txHelper = remixLib.execution.txHelper
var TreeView = require('./TreeView') var TreeView = require('./TreeView')
var txCallBacks = require('./sendTxCallbacks') var txCallBacks = require('./sendTxCallbacks')
const _paq = window._paq = window._paq || []
function UniversalDAppUI (blockchain, logCallback) { function UniversalDAppUI (blockchain, logCallback) {
this.blockchain = blockchain this.blockchain = blockchain
@ -243,6 +244,7 @@ UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, i
outputOverride.appendChild(decoded) outputOverride.appendChild(decoded)
} }
} }
_paq.push(['trackEvent', 'udapp', lookupOnly ? 'call' : args.funABI.type !== 'fallback' ? 'lowLevelInteracions' : 'transact'])
const params = args.funABI.type !== 'fallback' ? inputsValues : '' const params = args.funABI.type !== 'fallback' ? inputsValues : ''
this.blockchain.runOrCallContractMethod( this.blockchain.runOrCallContractMethod(
args.contractName, args.contractName,

Loading…
Cancel
Save