Page is a not externally linkable
robzilla - 7:57 pm on May 22, 2011 (gmt 0)
If you have a considerable number of return visitors, and you're able to serve compressed content and set up caching headers, consider hosting ga.js locally. Set up an alert to notify you of updates to the file on Google's domain, and on your domain give it a unique name each time you update it (e.g. with the day's date, ga20110522.js). Then set up a far-future expiry date (e.g. a year), and make sure the file's served compressed.
Many sites use Google Analytics, but Google serves ga.js with an expiry header set to 24 hours, so that people who visit your site once daily (or less often) will likely have to redownload it on every first pageview. If you host it locally with proper expiry headers, they'll only have to download it when you've updated the Javascript file.
Unfortunately, you cannot host __utm.gif locally, so a call to Google's servers is still necessary. Fortunately, it's only 35B in size (303B transfer size), whereas ga.js is 11700B (11.7KB).