Add analytics and fix local vs publish settings.