pidgin/old.pidgin.im

Parents e3dfddf1170d
Children 97216ac01a22
* Remove "secondTracker" with tracking code UA-6596609-1. I don't know
what that is, or why we would need two trackers.
* Upgrade to the current version of the Google Analytics tracking code.
I would guess this one is more asynchronous than the previous version,
so it would have less impact on our page if the server hosting ga.js
couldn't be loaded.
--- a/inc/footer.inc Tue May 01 05:57:28 2012 +0000
+++ b/inc/footer.inc Tue May 01 06:16:27 2012 +0000
@@ -7,22 +7,16 @@
<!-- Begin Google Analytics tracking code -->
<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-2814037-1']);
+_gaq.push(['_setDomainName', 'pidgin.im']);
+_gaq.push(['_trackPageview']);
-<script type="text/javascript">
-var pageTracker = _gat._getTracker("UA-2814037-1");
-pageTracker._setDomainName(".pidgin.im");
-pageTracker._initData();
-pageTracker._trackPageview();
-
-var secondTracker = _gat._getTracker("UA-6596609-1");
-secondTracker._setDomainName(".pidgin.im");
-secondTracker._initData();
-<?php if ($page['section'] == 'Home') { ?>
-secondTracker._trackPageview("/1527532502/test");
-<?php } ?>
+(function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
</script>
<!-- End Google Analytics tracking code -->