I’m using this template to add the javascript required to call out to Google Analytics:

<mt:If name="analytics_code"><mt:If name="analytics_cookie_path"><mt:Else><MTSetVar name="analytics_cookie_path" value="/blog/"></mt:If><script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script><script type="text/javascript">
try {
var pageTracker = _gat._getTracker("<MTGetVar name="analytics_code">");
pageTracker._setCookiePath("<MTGetVar name="analytics_cookie_path">");<mt:If name="analytics_cookie_domain">
pageTracker._setDomainName("<MTGetVar name="analytics_cookie_domain">");</mt:If>
pageTracker._trackPageview();} catch(err) {}</script></mt:If>