@@ -28,6 +28,13 @@ function trackDomain(domainToTrack, u, paqName) {
28
28
( function ( ) {
29
29
_paq . push ( [ 'setTrackerUrl' , u + 'matomo.php?debug=1' ] ) ;
30
30
_paq . push ( [ 'setSiteId' , domainToTrack ] ) ;
31
+
32
+ if ( domainToTrack ) {
33
+ const secondaryTrackerUrl = 'https://ethereumfoundation.matomo.cloud/'
34
+ const secondaryWebsiteId = domainToTrack
35
+ _paq . push ( [ 'addTracker' , secondaryTrackerUrl , secondaryWebsiteId ] )
36
+ }
37
+
31
38
var d = document , g = d . createElement ( 'script' ) , s = d . getElementsByTagName ( 'script' ) [ 0 ] ;
32
39
g . async = true ; g . src = u + 'matomo.js' ; s . parentNode . insertBefore ( g , s ) ;
33
40
} ) ( ) ;
@@ -53,20 +60,8 @@ if (window.electronAPI) {
53
60
}
54
61
} )
55
62
} else {
56
- if ( domainToTrack ) {
57
- trackDomain ( domainToTrack , 'https://ethereumfoundation.matomo.cloud/' , '_paq' )
58
- // Override push method
59
- window . _paq . push = function ( ...args ) {
60
- // Push to the original _paq
61
- const result = originalPush . apply ( this , args )
62
-
63
- // Also replicate to other trackers
64
- if ( window . _paq2 ) window . _paq2 . push ( ...args )
65
- return result ;
66
- }
67
- }
68
63
if ( domainOnPremToTrack ) {
69
- trackDomain ( domainOnPremToTrack , 'https://matomo.remix.live/matomo/' , '_paq2' )
64
+ trackDomain ( domainOnPremToTrack , 'https://matomo.remix.live/matomo/' , '_paq' )
70
65
}
71
66
}
72
67
function isElectron ( ) {
0 commit comments