Q:

What code is needed to be notified in real-time whenever my iOS app is downloaded?

I recently published my first iOS app and felt really dissatisfied with apple's iTunesConnect portal for tracking app sales. Specifically, I can't tell what time of day the app was downloaded, and I have to wait for the results until the next morning.
Does anyone know a piece of code that can be unobstrusively inserted in my app that will somehow report to me after if has been installed for the first time? I don't want any privacy/rules violations, I just want the app to report that it has been downloaded, and maybe a few metrics regarding country/time/etc.
Thanks for the help!
EDIT:
Regarding a first run 'phone home,' is it possible to execute some HTML without having the user knowing (I don't want to interrupt their experience by opening a webbrowser). For example, some javascript from a statcounter? If not, what can I do?

A:

There are a lot of analytics tools that can help you get better metrics.
Flurry
Google Analytics
Mixpanel
Kissmetrics
Google analytics gives you usage information in real time, which is nice.
Also, if your users log in through Facebook, they provide some interesting analytics as well.

