aspnet / live.asp.net

Code for live.asp.net, which hosts the ASP.NET Community Stand-up
https://live.asp.net/
MIT License
289 stars 114 forks source link

Add anaylytics #4

Closed DamianEdwards closed 9 years ago

DamianEdwards commented 9 years ago

These should only show up when served from production.

For MS:

<script type="text/javascript">
       var varSegmentation = 0;
       var varClickTracking = 1;
       var varCustomerTracking = 1;
       var varAutoFirePV = 1;
       var Route = 12656;
       var Ctrl = "";

       document.write("<script type='text/javascript' src='" + (window.location.protocol) + "//c.microsoft.com/ms.js'" + "'><\/script>");   
</script>
<noscript><img alt="" width="1" height="1" src="//c.microsoft.com/trans_pixel.aspx"/></noscript>

For Google Anaylytics:

<script type="text/javascript">
       (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
       (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
       m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
       })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

       ga('create', 'UA-61337531-1', 'auto', {'name': 'mscTracker'});
       ga('mscTracker.send', 'pageview');
</script>
Eilon commented 9 years ago

Why not use Application Insights?

DamianEdwards commented 9 years ago

These are the links given to us by Neudesic who run our public properties.

jongalloway commented 9 years ago

I'll ask about that - last I heard we were using both on asp.net.

Eilon commented 9 years ago

Ah so it's what we use on www.asp.net, that's fine then. Thought this might be a fully homegrown thing like packagesearch.