Fixed upsert in app metadata updater.
Moved Google Analytics code into header.