[gnome-web-www] Update the piwik tracking code and disable cookies
- From: Andrea Veri <av src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-web-www] Update the piwik tracking code and disable cookies
- Date: Thu, 30 Jan 2014 17:00:21 +0000 (UTC)
commit cd2626d6721087d8e1f65617810c2cfb8d48964c
Author: Andrea Veri <av gnome org>
Date: Thu Jan 30 18:00:13 2014 +0100
Update the piwik tracking code and disable cookies
theme/footer.php | 31 ++++++++++++++++++-------------
1 files changed, 18 insertions(+), 13 deletions(-)
---
diff --git a/theme/footer.php b/theme/footer.php
index 168e974..b1802a6 100644
--- a/theme/footer.php
+++ b/theme/footer.php
@@ -51,20 +51,25 @@
</div>
<?php if ($_SERVER['HTTP_HOST'] != 'localhost') { ?>
- <!-- 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", 1);
- piwikTracker.trackPageView();
- piwikTracker.enableLinkTracking();
- } catch( err ) {}
- </script><noscript><p><img src="http://webstats.gnome.org/piwik.php?idsite=1" style="border:0"
alt=""/></p></noscript>
- <!-- End Piwik Tag -->
- <?php } ?>
+
+ <!-- Piwik -->
+ <script type="text/javascript">
+ 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", "1"]);
+ 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 -->
+ <?php } ?>
<?php
wp_footer();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]