Apparently the tracking code must be added between the closing header tag.
Also, you can do this through the admin interface, Configure => Advanced => Footer Code