summaryrefslogtreecommitdiffstats
path: root/debian/patches/debian/0010-remove-googleanalytics.patch
blob: 3bc8a4afed79e7b4e23488568381c24cf390b44f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Author: Lennart Weller <lhw@ring0.de>
Subject: Remove googleanalytics

diff -Naurp netdata.orig/web/gui/demosites2.html netdata/web/gui/demosites2.html
--- netdata.orig/web/gui/demosites2.html	2021-02-03 14:09:31.000000000 +0100
+++ netdata/web/gui/demosites2.html	2021-02-07 13:00:35.014255664 +0100
@@ -1096,17 +1096,4 @@
     </div>
 </div>
 </body>
-<script>
-    // google analytics when this is used for the home page of the demo sites
-    // you don't need this if you customize this dashboard for your needs
-    setTimeout(function() {
-        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
-        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
-        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
-        })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
-
-        ga('create', 'UA-64295674-3', 'auto');
-        ga('send', 'pageview');
-    }, 2000);
-</script>
 </html>
diff -Naurp netdata.orig/web/gui/demosites.html netdata/web/gui/demosites.html
--- netdata.orig/web/gui/demosites.html	2021-02-03 14:09:31.000000000 +0100
+++ netdata/web/gui/demosites.html	2021-02-07 12:59:33.954375891 +0100
@@ -1385,14 +1385,6 @@ p {
         }(c)))
     }
 
-    function o() {
-        !function (t, e, a, n, o, i) {
-            t.GoogleAnalyticsObject = n, t[n] || (t[n] = function () {
-                (t[n].q = t[n].q || []).push(arguments)
-            }), t[n].l = +new Date, o = e.createElement(a), i = e.getElementsByTagName(a)[0], o.src = "//www.google-analytics.com/analytics.js", i.parentNode.insertBefore(o, i)
-        }(t, r, "script", "ga"), ga("create", "UA-64295674-3", "auto"), ga("send", "pageview", "/site"+window.location.pathname), t.document.addEventListener("click", n)
-    }
-
     function i() {
         !function (t, e, a) {
             var n, o = t.getElementsByTagName(e)[0];
diff -Naurp netdata.orig/web/gui/infographic.html netdata/web/gui/infographic.html
--- netdata.orig/web/gui/infographic.html	2021-02-03 14:09:31.000000000 +0100
+++ netdata/web/gui/infographic.html	2021-02-07 13:00:20.950283510 +0100
@@ -126,14 +126,6 @@
         }(c)))
     }
 
-    function o() {
-        !function (t, e, a, n, o, i) {
-            t.GoogleAnalyticsObject = n, t[n] || (t[n] = function () {
-                (t[n].q = t[n].q || []).push(arguments)
-            }), t[n].l = +new Date, o = e.createElement(a), i = e.getElementsByTagName(a)[0], o.src = "//www.google-analytics.com/analytics.js", i.parentNode.insertBefore(o, i)
-        }(t, r, "script", "ga"), ga("create", "UA-64295674-3", "auto"), ga("send", "pageview"), t.document.addEventListener("click", n)
-    }
-
     function i() {
         !function (t, e, a) {
             var n, o = t.getElementsByTagName(e)[0];
diff -Naurp netdata.orig/web/gui/main.js netdata/web/gui/main.js
--- netdata.orig/web/gui/main.js	2021-02-07 12:48:55.307522425 +0100
+++ netdata/web/gui/main.js	2021-02-07 13:00:13.098299018 +0100
@@ -4460,25 +4460,6 @@ function finalizePage() {
     if (isdemo()) {
         // do not to give errors on netdata demo servers for 60 seconds
         NETDATA.options.current.retries_on_data_failures = 60;
-
-        // google analytics when this is used for the home page of the demo sites
-        // this does not run on user's installations
-        setTimeout(function () {
-            (function (i, s, o, g, r, a, m) {
-                i['GoogleAnalyticsObject'] = r;
-                i[r] = i[r] || function () {
-                    (i[r].q = i[r].q || []).push(arguments)
-                }, i[r].l = 1 * new Date();
-                a = s.createElement(o),
-                    m = s.getElementsByTagName(o)[0];
-                a.async = 1;
-                a.src = g;
-                m.parentNode.insertBefore(a, m)
-            })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
-
-            ga('create', 'UA-64295674-3', 'auto');
-            ga('send', 'pageview', '/demosite/' + window.location.host);
-        }, 2000);
     } else {
         notifyForUpdate();
     }