www: ff901b27: * Remove "secondTracker" with tracking c...

markdoliner at pidgin.im markdoliner at pidgin.im
Tue May 1 02:22:12 EDT 2012


----------------------------------------------------------------------
Revision: ff901b27876686273e95728c17f05d2c2b88485b
Parent:   0f94131595969cf0922311348fc86bb8687f5863
Author:   markdoliner at pidgin.im
Date:     05/01/12 02:16:27
Branch:   im.pidgin.www
URL: http://d.pidgin.im/viewmtn/revision/info/ff901b27876686273e95728c17f05d2c2b88485b

Changelog: 

* 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.

Changes against parent 0f94131595969cf0922311348fc86bb8687f5863

  patched  inc/footer.inc

-------------- next part --------------
============================================================
--- inc/footer.inc	57c64ef607b9e29992d9ad0dbd3c774cb31ac922
+++ inc/footer.inc	93b4f519839590f4811b5f73c6bbf007323b2403
@@ -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 -->
 


More information about the Commits mailing list