This bash shell script will automatically upload your installation reports for all apps in your Google Play Developer Console. You’ll need to replace {YOUR_BUCKET_GOES_HERE} with your own google cloud bucket which you can find in the developer console.
These reports are only available on a monthly basis, so you could set up a cronjob to run on the first of every month to download reports from the previous month.
There are eight overall reports. The most important is probably the overview report. The full list is:
- overview
- carrier
- country
- device
- language
- os_version
- app_version
- tablets
These are the following steps for the script:
- Create a directory for the month, 201607 for example.
- CD (change directory) into the month folder and create directories for the variables in the array.
- CD into the new directories and create an upload directory.
- Download the current files, trim them and append it to a file in the upload folder.
- Using the gcloud alpha bigquery function, upload files to the corresponding dataset and table in Google BigQuery. You’ll also need to create a folder with a schema file for all of your uploads.
- Change {YOUR_GS_BUCKET} to your GCS bucket and then upload the root folder to your google cloud storage folder.