[planet-web] Update the piwik tracking code and disable cookies



commit e7f68bb54828a279e6d3685394a8b0969c6aea2e
Author: Andrea Veri <av gnome org>
Date:   Thu Jan 30 18:07:08 2014 +0100

    Update the piwik tracking code and disable cookies

 themes/gnome/index-2.0.html.tmpl |   26 ++++++++++++++++----------
 themes/gnome/index.html.tmpl     |   28 +++++++++++++++++-----------
 themes/gnome/mobile.html.tmpl    |   28 ++++++++++++++++------------
 themes/gnome/simple.html.tmpl    |   28 +++++++++++++++++-----------
 4 files changed, 66 insertions(+), 44 deletions(-)
---
diff --git a/themes/gnome/index-2.0.html.tmpl b/themes/gnome/index-2.0.html.tmpl
index a239f0c..23d9bc7 100644
--- a/themes/gnome/index-2.0.html.tmpl
+++ b/themes/gnome/index-2.0.html.tmpl
@@ -202,18 +202,24 @@ Hosted by <a href="http://www.redhat.com/";>Red Hat</a>.</p>
                });
        });
        </script>
+
 <!-- Piwik -->
 <script type="text/javascript">
-var pkBaseURL = (("https:" == document.location.protocol) ? "https://webstats.gnome.org/"; : 
"http://webstats.gnome.org/";);
-document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
-</script><script type="text/javascript">
-try {
-var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 6);
-piwikTracker.trackPageView();
-piwikTracker.enableLinkTracking();
-} catch( err ) {}
-</script><noscript><p><img src="https://webstats.gnome.org/piwik.php?idsite=6"; style="border:0" 
alt=""/></p></noscript>
-<!-- End Piwik Tag -->
+  var _paq = _paq || [];
+  _paq.push(['disableCookies']);
+  _paq.push(["trackPageView"]);
+  _paq.push(["enableLinkTracking"]);
+
+  (function() {
+    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://webstats.gnome.org/";
+    _paq.push(["setTrackerUrl", u+"piwik.php"]);
+    _paq.push(["setSiteId", "2"]);
+    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; 
g.type="text/javascript";
+    g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
+  })();
+</script>
+<!-- End Piwik Code -->
+
 </body>
 
 </html>
diff --git a/themes/gnome/index.html.tmpl b/themes/gnome/index.html.tmpl
index ab60f6a..caa4313 100644
--- a/themes/gnome/index.html.tmpl
+++ b/themes/gnome/index.html.tmpl
@@ -185,18 +185,24 @@ Hosted by <a href="http://www.redhat.com/";>Red Hat</a>.</p>
                });
        });
        </script>
-<!-- Piwik --> 
+
+<!-- Piwik -->
 <script type="text/javascript">
-var pkBaseURL = (("https:" == document.location.protocol) ? "https://webstats.gnome.org/"; : 
"http://webstats.gnome.org/";);
-document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
-</script><script type="text/javascript">
-try {
-var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 2);
-piwikTracker.trackPageView();
-piwikTracker.enableLinkTracking();
-} catch( err ) {}
-</script><noscript><p><img src="https://webstats.gnome.org/piwik.php?idsite=2"; style="border:0" alt="" 
/></p></noscript>
-<!-- End Piwik Tracking Code -->
+  var _paq = _paq || [];
+  _paq.push(['disableCookies']);
+  _paq.push(["trackPageView"]);
+  _paq.push(["enableLinkTracking"]);
+
+  (function() {
+    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://webstats.gnome.org/";
+    _paq.push(["setTrackerUrl", u+"piwik.php"]);
+    _paq.push(["setSiteId", "2"]);
+    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; 
g.type="text/javascript";
+    g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
+  })();
+</script>
+<!-- End Piwik Code -->
+
 </body>
 
 </html>
diff --git a/themes/gnome/mobile.html.tmpl b/themes/gnome/mobile.html.tmpl
index 5e805f0..4cf9f76 100644
--- a/themes/gnome/mobile.html.tmpl
+++ b/themes/gnome/mobile.html.tmpl
@@ -314,18 +314,22 @@ Hosted by <a href="http://www.redhat.com/";>Red Hat</a>.</p>
                });
        });
        </script>
-<!-- Piwik --> 
+
+<!-- Piwik -->
 <script type="text/javascript">
-var pkBaseURL = (("https:" == document.location.protocol) ? "https://webstats.gnome.org/"; : 
"http://webstats.gnome.org/";);
-document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
-</script><script type="text/javascript">
-try {
-var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 2);
-piwikTracker.trackPageView();
-piwikTracker.enableLinkTracking();
-} catch( err ) {}
-</script><noscript><p><img src="https://webstats.gnome.org/piwik.php?idsite=2"; style="border:0" alt="" 
/></p></noscript>
-<!-- End Piwik Tracking Code -->
-</body>
+  var _paq = _paq || [];
+  _paq.push(['disableCookies']);
+  _paq.push(["trackPageView"]);
+  _paq.push(["enableLinkTracking"]);
+
+  (function() {
+    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://webstats.gnome.org/";
+    _paq.push(["setTrackerUrl", u+"piwik.php"]);
+    _paq.push(["setSiteId", "2"]);
+    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; 
g.type="text/javascript";
+    g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
+  })();
+</script>
+<!-- End Piwik Code -->
 
 </html>
diff --git a/themes/gnome/simple.html.tmpl b/themes/gnome/simple.html.tmpl
index ab60f6a..caa4313 100644
--- a/themes/gnome/simple.html.tmpl
+++ b/themes/gnome/simple.html.tmpl
@@ -185,18 +185,24 @@ Hosted by <a href="http://www.redhat.com/";>Red Hat</a>.</p>
                });
        });
        </script>
-<!-- Piwik --> 
+
+<!-- Piwik -->
 <script type="text/javascript">
-var pkBaseURL = (("https:" == document.location.protocol) ? "https://webstats.gnome.org/"; : 
"http://webstats.gnome.org/";);
-document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
-</script><script type="text/javascript">
-try {
-var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 2);
-piwikTracker.trackPageView();
-piwikTracker.enableLinkTracking();
-} catch( err ) {}
-</script><noscript><p><img src="https://webstats.gnome.org/piwik.php?idsite=2"; style="border:0" alt="" 
/></p></noscript>
-<!-- End Piwik Tracking Code -->
+  var _paq = _paq || [];
+  _paq.push(['disableCookies']);
+  _paq.push(["trackPageView"]);
+  _paq.push(["enableLinkTracking"]);
+
+  (function() {
+    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://webstats.gnome.org/";
+    _paq.push(["setTrackerUrl", u+"piwik.php"]);
+    _paq.push(["setSiteId", "2"]);
+    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; 
g.type="text/javascript";
+    g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
+  })();
+</script>
+<!-- End Piwik Code -->
+
 </body>
 
 </html>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]