Merge pull request #3739 from ethereum/yann300-patch-53

Add EF matomo cloud
pull/5370/head
yann300 2 years ago committed by GitHub
commit 428bb79aa3
  1. 17
      apps/remix-ide/src/assets/js/loader.js

@ -5,6 +5,13 @@ const domains = {
'6fd22d6fe5549ad4c4d8fd3ca0b7816b.mod': 35 // remix desktop
}
const domainsSecondaryTracker = {
'remix-alpha.ethereum.org': 12,
'remix-beta.ethereum.org': 10,
'remix.ethereum.org': 8,
'6fd22d6fe5549ad4c4d8fd3ca0b7816b.mod': 20 // remix desktop
}
if (domains[window.location.hostname]) {
var _paq = window._paq = window._paq || []
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
@ -21,12 +28,10 @@ if (domains[window.location.hostname]) {
var u = "https://matomo.ethereum.org/";
_paq.push(['setTrackerUrl', u + 'matomo.php'])
_paq.push(['setSiteId', domains[window.location.hostname]])
// Send all of the Remix live tracking data to the secondary Matomo server
if (window.location.hostname === 'remix.ethereum.org') {
var secondaryTracker = 'https://remix-ethereum.matomo.cloud/matomo.php';
var secondaryWebsiteId = 1;
_paq.push(['addTracker', secondaryTracker, secondaryWebsiteId]);
}
// Send all of the Remix tracking data to the secondary Matomo server
var secondaryTracker = 'https://ethereumfoundation.matomo.cloud/matomo.php';
var secondaryWebsiteId = domainsSecondaryTracker[window.location.hostname];
_paq.push(['addTracker', secondaryTracker, secondaryWebsiteId]);
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)
})()

Loading…
Cancel
Save