diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx index 18798c3f4f..ca5232484d 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx @@ -4,6 +4,7 @@ import { ThemeContext, themes } from '../themeContext' import Carousel from 'react-multi-carousel' import 'react-multi-carousel/lib/styles.css' import CustomNavButtons from './customNavButtons' +const _paq = window._paq = window._paq || [] // eslint-disable-line function HomeTabFeatured() { const themeFilter = useContext(ThemeContext) @@ -44,7 +45,7 @@ function HomeTabFeatured() {
JUMP INTO WEB3

The Remix Project is a rich toolset which can be used for the entire journey of contract development by users of any knowledge level, and as a learning lab for teaching and experimenting with Ethereum.

- More + _paq.push(['trackEvent', 'hometab', 'featuredSection', 'jumpIntoWeb3'])} target="__blank" href="https://remix-project.org">More
@@ -55,7 +56,7 @@ function HomeTabFeatured() {

Remix Project rewards contributors, beta testers, and UX research participants with NFTs deployed on Optimism. Remix Reward holders are able to mint a second “Remixer” user NFT badge to give to any other user of their choice.

- More + _paq.push(['trackEvent', 'hometab', 'featuredSection', 'remixRewards'])} href="https://rewards.remix.ethereum.eth.limo">More
@@ -64,7 +65,7 @@ function HomeTabFeatured() {
BETA TESTING

Our community supports us.

You can join Beta Testing before each release of Remix IDE. Help us test now and get a handle on new features!

- More + _paq.push(['trackEvent', 'hometab', 'featuredSection', 'betatesting'])} target="__blank" href="https://rewards.remix.ethereum.eth.limo">More
diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx index baa80619b8..f092c9a9fb 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx @@ -2,6 +2,7 @@ import React, { useState, useRef, useReducer } from 'react' import { ModalDialog } from '@remix-ui/modal-dialog' // eslint-disable-line import { Toaster } from '@remix-ui/toaster' // eslint-disable-line +const _paq = window._paq = window._paq || [] // eslint-disable-line interface HomeTabFileProps { plugin: any @@ -36,7 +37,8 @@ function HomeTabFile ({plugin}: HomeTabFileProps) { const inputValue = useRef(null) - const processLoading = () => { + const processLoading = (type: string) => { + _paq.push(['trackEvent', 'hometab', 'filesSection', 'importFrom' + type]) const contentImport = plugin.contentImport const workspace = plugin.fileManager.getProvider('workspace') contentImport.import( @@ -70,18 +72,22 @@ function HomeTabFile ({plugin}: HomeTabFileProps) { } const createNewFile = async () => { + _paq.push(['trackEvent', 'hometab', 'filesSection', 'createNewFile']) plugin.verticalIcons.select('filePanel') await plugin.call('filePanel', 'createNewFile') } const uploadFile = async (target) => { + _paq.push(['trackEvent', 'hometab', 'filesSection', 'uploadFile']) await plugin.call('filePanel', 'uploadFile', target) } const connectToLocalhost = () => { + _paq.push(['trackEvent', 'hometab', 'filesSection', 'connectToLocalhost']) plugin.appManager.activatePlugin('remixd') } const importFromGist = () => { + _paq.push(['trackEvent', 'hometab', 'filesSection', 'importFromGist']) plugin.call('gistHandler', 'load', '') plugin.verticalIcons.select('filePanel') } @@ -108,7 +114,7 @@ function HomeTabFile ({plugin}: HomeTabFileProps) { okLabel='Import' hide={ !state.showModalDialog } handleHide={ () => hideFullMessage() } - okFn={ () => processLoading() } + okFn={ () => processLoading(state.modalInfo.title) } >
{ state.modalInfo.loadItem !== '' && Enter the { state.modalInfo.loadItem } you would like to load. } diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx index c0cbd83ad1..ae6be5ad5c 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx @@ -60,7 +60,7 @@ function HomeTabGetStarted ({plugin}: HomeTabGetStartedProps) { await plugin.call('filePanel', 'createWorkspace', templateName + "_" + timeStamp, templateName) await plugin.call('filePanel', 'setWorkspace', templateName + "_" + timeStamp) plugin.verticalIcons.select('filePanel') - _paq.push(['trackEvent', 'homeTab', 'homeGetStarted', templateName]) + _paq.push(['trackEvent', 'hometab', 'homeGetStarted', templateName]) } return ( diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx index e9d1a345b3..daa7c6fff7 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx @@ -34,7 +34,7 @@ function HomeTabLearn ({plugin}: HomeTabLearnProps) { await plugin.appManager.activatePlugin(['solidity', 'LearnEth', 'solidityUnitTesting']) plugin.call('LearnEth', 'startTutorial', 'ethereum/remix-workshops', 'master', tutorial) plugin.verticalIcons.select('LearnEth') - _paq.push(['trackEvent', 'homeTab', 'startLearnEthTutorial', tutorial]) + _paq.push(['trackEvent', 'hometab', 'startLearnEthTutorial', tutorial]) } return ( diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabScamAlert.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabScamAlert.tsx index 1caa8b3499..50fa8598f2 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabScamAlert.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabScamAlert.tsx @@ -1,5 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import React from 'react' +const _paq = window._paq = window._paq || [] // eslint-disable-line function HomeTabScamAlert () { return ( @@ -15,10 +16,10 @@ function HomeTabScamAlert () { Beware of online videos promoting "liquidity front runner bots": - Learn more + _paq.push(['trackEvent', 'hometab', 'scamAlert', 'learnMore'])} target="__blank" href="https://medium.com/remix-ide/remix-in-youtube-crypto-scams-71c338da32d">Learn more - Additional safety tips:  here + Additional safety tips:   _paq.push(['trackEvent', 'hometab', 'scamAlert', 'safetyTips'])} target="__blank" href="https://remix-ide.readthedocs.io/en/latest/security.html">here
diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx index 5e461df8a1..fa48393d97 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx @@ -4,6 +4,7 @@ import BasicLogo from 'libs/remix-ui/vertical-icons-panel/src/lib/components/Bas import { ThemeContext } from '../themeContext' import React, { useEffect, useState, useRef, useContext } from 'react' import { OverlayTrigger, Tooltip } from 'react-bootstrap'// eslint-disable-line +const _paq = window._paq = window._paq || [] // eslint-disable-line function HomeTabTitle() { useEffect(() => { @@ -119,10 +120,10 @@ function HomeTabTitle() { The Native IDE for Web3 Development.