Permalink
Browse files

Update google analytics tracking code

  • Loading branch information...
1 parent d5683f6 commit dd753cda400b9f570d8e828d583f0bb6ca5d3997 @mightybyte mightybyte committed Dec 10, 2012
Showing with 18 additions and 13 deletions.
  1. +1 −1 snaplets/heist/templates/wrap.tpl
  2. +8 −6 static/media/js/init.js
  3. +9 −6 static/media/js/site.js
@@ -15,7 +15,7 @@
</div><!--end footer-->
<script type="text/javascript"
- src="/media/js/site.js"> </script>
+ src="/media/js/site.js?v=1"> </script>
</body>
</html>
View
@@ -13,11 +13,13 @@ $(document).ready(function(){
}
});
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-15984160-1']);
+_gaq.push(['_trackPageview']);
-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"));
+(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);
+})();
-try {
- var pageTracker = _gat._getTracker("UA-15984160-1");
- pageTracker._trackPageview();
-} catch(err) {}
View
Oops, something went wrong.

0 comments on commit dd753cd

Please sign in to comment.