add matomo for external links

pull/4886/head
aniket-engg 5 months ago committed by Aniket
parent 9565b6bc13
commit 0312e42349
  1. 11
      libs/remix-ui/run-tab/src/lib/components/solScanTable.tsx
  2. 8
      libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx

@ -1,6 +1,7 @@
// eslint-disable-next-line no-use-before-define // eslint-disable-next-line no-use-before-define
import React from 'react' import React from 'react'
import parse from 'html-react-parser'; import parse from 'html-react-parser'
const _paq = (window._paq = window._paq || [])
interface SolScanTableProps { interface SolScanTableProps {
scanDetails: Record<string, any>[], scanDetails: Record<string, any>[],
@ -13,7 +14,13 @@ export function SolScanTable(props: SolScanTableProps) {
return ( return (
<> <>
<p>Scanning successful! <b>{scanDetails.length} warnings </b> found for file: <b>{fileName}</b></p> <p>Scanning successful! <b>{scanDetails.length} warnings </b> found for file: <b>{fileName}</b></p>
<p>See the warning details below. For more details, <a href="https://solidityscan.com/signup" target='blank'>Go to SolidityScan</a></p> <p>See the warning details below. For more details,
<a href="https://solidityscan.com/signup"
target='_blank'
onClick={() => _paq.push(['trackEvent', 'udapp', 'solidityScan', 'goToSolidityScan'])}>
Go to SolidityScan
</a>
</p>
<table className="table table-bordered table-hover"> <table className="table table-bordered table-hover">
<thead> <thead>
<tr> <tr>

@ -304,7 +304,13 @@ export function UniversalDappUI(props: UdappProps) {
title: <FormattedMessage id="udapp.solScan.modalTitle" />, title: <FormattedMessage id="udapp.solScan.modalTitle" />,
message: <div className='d-flex flex-column'> message: <div className='d-flex flex-column'>
<span><FormattedMessage id="udapp.solScan.modalMessage" /> <span><FormattedMessage id="udapp.solScan.modalMessage" />
<a href={'https://solidityscan.com'} target="_blank" >Learn more</a></span><br/> <a href={'https://solidityscan.com'}
target="_blank"
onClick={() => _paq.push(['trackEvent', 'udapp', 'solidityScan', 'learnMore'])}>
Learn more
</a>
</span>
<br/>
<FormattedMessage id="udapp.solScan.likeToContinue" /> <FormattedMessage id="udapp.solScan.likeToContinue" />
</div>, </div>,
okLabel: <FormattedMessage id="udapp.solScan.modalOkLabel" />, okLabel: <FormattedMessage id="udapp.solScan.modalOkLabel" />,

Loading…
Cancel
Save