Skip to content

Instantly share code, notes, and snippets.

@cpilsworth
Created December 2, 2009 09:45
Show Gist options
  • Save cpilsworth/247092 to your computer and use it in GitHub Desktop.
Save cpilsworth/247092 to your computer and use it in GitHub Desktop.
<%--
Place this file in /apps/foundation/components/page to use the new Google Analytics async
tracking code as described here:
http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html
--%>
<%@page session="false"%>
<script type="text/javascript">
(function() {
var ga = document.createElement('script');
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
ga.setAttribute('async', 'true');
document.documentElement.firstChild.appendChild(ga);
})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment