Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for old google analytics code

  • Loading branch information...
commit 4bb4f7b79986723dc05beaeb1019c6de51754bd9 1 parent d80c2e4
@msarchet msarchet authored
Showing with 10 additions and 5 deletions.
  1. +10 −5 SmallestDotNet/Default.aspx
View
15 SmallestDotNet/Default.aspx
@@ -163,11 +163,16 @@
})
</script>
- <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"));
- var pageTracker = _gat._getTracker("UA-130207-3");
- pageTracker._trackPageview();
+ <script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-130207-3']);
+ _gaq.push(['_trackPageview']);
+
+ (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>
</body>
</html>
Please sign in to comment.
Something went wrong with that request. Please try again.