Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions apps/remix-ide/src/assets/js/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ function trackDomain(domainToTrack, u, paqName) {
(function () {
_paq.push(['setTrackerUrl', u + 'matomo.php?debug=1']);
_paq.push(['setSiteId', domainToTrack]);

if (domainToTrack) {
const secondaryTrackerUrl = 'https://ethereumfoundation.matomo.cloud/'
const secondaryWebsiteId = domainToTrack
_paq.push(['addTracker', secondaryTrackerUrl, secondaryWebsiteId])
}

var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
g.async = true; g.src = u + 'matomo.js'; s.parentNode.insertBefore(g, s);
})();
Expand All @@ -53,20 +60,8 @@ if (window.electronAPI) {
}
})
} else {
if (domainToTrack) {
trackDomain(domainToTrack, 'https://ethereumfoundation.matomo.cloud/', '_paq')
// Override push method
window._paq.push = function (...args) {
// Push to the original _paq
const result = originalPush.apply(this, args)

// Also replicate to other trackers
if (window._paq2) window._paq2.push(...args)
return result;
}
}
if (domainOnPremToTrack) {
trackDomain(domainOnPremToTrack, 'https://matomo.remix.live/matomo/', '_paq2')
trackDomain(domainOnPremToTrack, 'https://matomo.remix.live/matomo/', '_paq')
}
}
function isElectron() {
Expand Down