Add EF matomo cloud

pull/3739/head
yann300 2 years ago committed by GitHub
parent f6db76e454
commit 13ef013014
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      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;
// 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