mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
docs: Switch to the asynchronous Google Analytics snippet
The old snippet needlessly uses `document.write`. Let’s use the optimized version of the most recent, asynchronous GA snippet: http://mathiasbynens.be/notes/async-analytics-snippet
This commit is contained in:
1 parent
1b114162ab
commit
839bf025a8
7 files changed
+65
-75
No files matched your search
+8
-9
@@ -66,21 +66,20 @@
|
||||
<li><a href="http://twitter.com/nodejs" class="twitter">@nodejs</a></li>
|
||||
</ul>
|
||||
|
||||
<p>Copyright <a href="http://joyent.com">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/__VERSION__/LICENSE">license</a>.</p>
|
||||
<p>Copyright <a href="http://joyent.com/">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/__VERSION__/LICENSE">license</a>.</p>
|
||||
</div>
|
||||
|
||||
<script src="../sh_main.js"></script>
|
||||
<script src="../sh_javascript.min.js"></script>
|
||||
<script>highlight(undefined, undefined, 'pre');</script>
|
||||
<script>
|
||||
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"));
|
||||
window._gaq = [['_setAccount', 'UA-10874194-2'], ['_trackPageview']];
|
||||
(function(d, t) {
|
||||
var g = d.createElement(t),
|
||||
s = d.getElementsByTagName(t)[0];
|
||||
g.src = '//www.google-analytics.com/ga.js';
|
||||
s.parentNode.insertBefore(g, s);
|
||||
}(document, 'script'));
|
||||
</script>
|
||||
<script>
|
||||
try {
|
||||
var pageTracker = _gat._getTracker("UA-10874194-2");
|
||||
pageTracker._trackPageview();
|
||||
} catch(err) {}</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user