add tags for activation tracking

pull/874/head
lianahus 4 years ago committed by Liana Husikyan
parent ed0962d66c
commit 59053b2ef9
  1. 16
      apps/remix-ide/index.html
  2. 14
      apps/remix-ide/src/app/tabs/settings-tab.js
  3. 3
      apps/remix-ide/src/remixAppManager.js

@ -32,6 +32,22 @@
<link rel="icon" type="x-icon" href="assets/img/icon.png"> <link rel="icon" type="x-icon" href="assets/img/icon.png">
<script src="assets/js/browserfs.min.js"></script> <script src="assets/js/browserfs.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://matomo.ethereum.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '27']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</head> </head>
<body> <body>
<script> <script>

@ -141,6 +141,13 @@ module.exports = class SettingsTab extends ViewPlugin {
this._view.themes = this._deps.themeModule.getThemes() this._view.themes = this._deps.themeModule.getThemes()
this._view.themesCheckBoxes = this.createThemeCheckies() this._view.themesCheckBoxes = this.createThemeCheckies()
this._view.matomo = yo`
<div class="custom-control custom-checkbox mb-1">
${this._view.useMatomoAnalytics}>
${this._view.useMatomoAnalyticsLabel}
</div>
`
this._view.config.general = yo` this._view.config.general = yo`
<div class="${css.info} border-top"> <div class="${css.info} border-top">
<div class="card-body pt-3 pb-2"> <div class="card-body pt-3 pb-2">
@ -158,13 +165,10 @@ module.exports = class SettingsTab extends ViewPlugin {
${this._view.textWrapLabel} ${this._view.textWrapLabel}
</div> </div>
<div class="custom-control custom-checkbox mb-1"> <div class="custom-control custom-checkbox mb-1">
${this._view.personal}> ${this._view.personal}
${this._view.personalLabel} ${this._view.personalLabel}
</div> </div>
<div class="custom-control custom-checkbox mb-1">
${this._view.useMatomoAnalytics}>
${this._view.useMatomoAnalyticsLabel}
</div>
</div> </div>
</div> </div>
` `

@ -4,6 +4,7 @@ import { IframePlugin } from '@remixproject/engine-web'
import { EventEmitter } from 'events' import { EventEmitter } from 'events'
import QueryParams from './lib/query-params' import QueryParams from './lib/query-params'
import { PermissionHandler } from './app/ui/persmission-handler' import { PermissionHandler } from './app/ui/persmission-handler'
const _paq = window._paq = window._paq || []
const requiredModules = [ // services + layout views + system views const requiredModules = [ // services + layout views + system views
'manager', 'compilerArtefacts', 'compilerMetadata', 'contextualListener', 'editor', 'offsetToLineColumnConverter', 'network', 'theme', 'manager', 'compilerArtefacts', 'compilerMetadata', 'contextualListener', 'editor', 'offsetToLineColumnConverter', 'network', 'theme',
@ -65,6 +66,7 @@ export class RemixAppManager extends PluginManager {
onPluginActivated (plugin) { onPluginActivated (plugin) {
this.pluginLoader.set(plugin, this.actives) this.pluginLoader.set(plugin, this.actives)
this.event.emit('activate', plugin) this.event.emit('activate', plugin)
_paq.push(['trackEvent', 'pluginManager', 'activate', plugin])
} }
getAll () { getAll () {
@ -80,6 +82,7 @@ export class RemixAppManager extends PluginManager {
onPluginDeactivated (plugin) { onPluginDeactivated (plugin) {
this.pluginLoader.set(plugin, this.actives) this.pluginLoader.set(plugin, this.actives)
this.event.emit('deactivate', plugin) this.event.emit('deactivate', plugin)
_paq.push(['trackEvent', 'pluginManager', 'deactivate', plugin])
} }
isRequired (name) { isRequired (name) {

Loading…
Cancel
Save