I think I solved this by doing the following. It seems to have injected the script just fine ;) private void EmbedGoogleAnalytics() { if (CSharpXamlForHtml5.Environment.IsRunningInJavaScript) { JSIL.Verbatim.Expression("(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function()...