|
15 | 15 |
|
16 | 16 | <!-- Matomo --> |
17 | 17 | <script> |
18 | | - var _paq = (window._paq = window._paq || []); |
19 | | - _paq.push(["disableCookies"]); |
20 | | - _paq.push(["trackPageView"]); |
21 | | - _paq.push(["enableLinkTracking"]); |
22 | | - (function () { |
23 | | - var u = "//matomo.hotosm.org/"; |
24 | | - _paq.push(["setTrackerUrl", u + "matomo.php"]); |
25 | | - _paq.push(["setSiteId", "34"]); |
26 | | - var d = document, |
27 | | - g = d.createElement("script"), |
28 | | - s = d.getElementsByTagName("script")[0]; |
29 | | - g.async = true; |
30 | | - g.src = u + "matomo.js"; |
31 | | - s.parentNode.insertBefore(g, s); |
32 | | - })(); |
| 18 | + var _paq = window._paq = window._paq || []; |
| 19 | + _paq.push(['disableCookies']); |
| 20 | + _paq.push(['trackPageView']); |
| 21 | + _paq.push(['enableLinkTracking']); |
| 22 | + (function () { |
| 23 | + var u = "//matomo.hotosm.org/"; |
| 24 | + _paq.push(['setTrackerUrl', u + 'matomo.php']); |
| 25 | + _paq.push(['setSiteId', '34']); |
| 26 | + var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; |
| 27 | + g.async = true; g.src = u + 'matomo.js'; s.parentNode.insertBefore(g, s); |
| 28 | + })(); |
33 | 29 |
|
34 | | - window.onload = function () { |
| 30 | + window.onload = function() { |
35 | 31 | /* Track download button clicks */ |
36 | 32 | if (U && "MAP" in U && "share" in U.MAP && "download") { |
37 | 33 | const uMapShareDownload = U.MAP.share.download; |
38 | | - U.MAP.share.download = function (...args) { |
39 | | - _paq.push([ |
40 | | - "trackEvent", |
41 | | - "Download", |
42 | | - "Click", |
43 | | - document.title.slice(0, 100), |
44 | | - 1, |
45 | | - ]); |
46 | | - return uMapShareDownload.apply(this, args); |
47 | | - }; |
| 34 | + U.MAP.share.download = function(...args) { |
| 35 | + _paq.push(['trackEvent', 'Download', 'Click', document.title.slice(0,100), 1]); |
| 36 | + return uMapShareDownload.apply(this, args); |
| 37 | + } |
48 | 38 | } |
49 | | - }; |
| 39 | + } |
50 | 40 | </script> |
51 | 41 | <!-- End Matomo Code --> |
0 commit comments