[planet-web] Update tracking code and disable cookies on news.gnome.org as well
- From: Andrea Veri <av src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [planet-web] Update tracking code and disable cookies on news.gnome.org as well
- Date: Thu, 30 Jan 2014 17:17:30 +0000 (UTC)
commit 89fd2a1a6ac1f0d61b3afcb19985f22901f6a60c
Author: Andrea Veri <av gnome org>
Date: Thu Jan 30 18:17:24 2014 +0100
Update tracking code and disable cookies on news.gnome.org as well
themes/news/index-2.0.html.tmpl | 26 ++++++++++++++++----------
themes/news/index-regular.html.tmpl | 26 ++++++++++++++++----------
themes/news/index.html.tmpl | 28 +++++++++++++++++-----------
3 files changed, 49 insertions(+), 31 deletions(-)
---
diff --git a/themes/news/index-2.0.html.tmpl b/themes/news/index-2.0.html.tmpl
index 0afcad9..a426fbc 100644
--- a/themes/news/index-2.0.html.tmpl
+++ b/themes/news/index-2.0.html.tmpl
@@ -205,18 +205,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", "6"]);
+ 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/news/index-regular.html.tmpl b/themes/news/index-regular.html.tmpl
index 9440eb3..b4cb919 100644
--- a/themes/news/index-regular.html.tmpl
+++ b/themes/news/index-regular.html.tmpl
@@ -315,18 +315,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", "6"]);
+ 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/news/index.html.tmpl b/themes/news/index.html.tmpl
index 8e3a2b9..61ff72e 100644
--- a/themes/news/index.html.tmpl
+++ b/themes/news/index.html.tmpl
@@ -315,18 +315,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", 5);
-piwikTracker.trackPageView();
-piwikTracker.enableLinkTracking();
-} catch( err ) {}
-</script><noscript><p><img src="https://webstats.gnome.org/piwik.php?idsite=5" 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", "6"]);
+ 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]