iTunes Analytics is a Python script that exports analytics from iTunes into CSV format.
iTunes Analytics can be used as a stand-alone program or as part of another Python project.
The script works by performing the necessary web requests to log a developer into iTunes Connect, and use the returned authentication cookies to perform the invite web request.
NOTE: itc_analytics.py requires your iTunes Connect password to complete the analytics request. If you use the script as part of another project you will need to store your iTunes Connect password somewhere it can be retrieved in plaintext in order to pass to the library. On the command line your iTunes Connect password is entered using the getpass library, which allows you to enter your password using stdin without echoing the password on the command line.
Usage:
python itc_analytics.py [measures|all-time|retention] <iTC login email> <App ID>
Python:
from itc_analytics import ITCAnalytics
try:
analytics = ITCAnalytics(<iTC email>, <iTC password>, <App ID>)
analytics.print_retention()
except Exception as e:
print 'Oops! Something went wrong!'
This script is heavily based off of the appdailysales project by Kirby Turner and friends.