The instructions here are now out of date; analytics and other tracking code can be added via the tracking code link in the manage page.
Ning sites include a handy snapshot of visitor and referral links that you can access through the Manage button; sometimes though you want something that will provide a bit more detail. Adding tracking code for Google Analytics or another stats package is just a case of knowing which file to modify.
For videos and photos sites, the best place to add your tracking code is at the bottom of the file at:
for Group sites, the best place to put your tracking code is probably the very top of the file at:
Before you make any changes to your site, remember that you can take a snapshot of the current code by going to Edit Source Code > Backup & Restore. If anything unexpected happens, you can always restore that version of the code and try again.