Scripts for exporting app analytics to BigQuery
Перейти к файлу
dependabot[bot] 01a6e2aa64
Bump hosted-git-info from 2.8.8 to 2.8.9 (#16)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-26 14:02:39 -04:00
.circleci Create custom api client to handle authentication (#13) 2021-02-04 17:34:43 -05:00
analytics_export Create custom api client to handle authentication (#13) 2021-02-04 17:34:43 -05:00
test Create custom api client to handle authentication (#13) 2021-02-04 17:34:43 -05:00
.dockerignore Set up project structure, docker, ci (#1) 2020-06-26 16:05:35 -04:00
.eslintrc.js Add prettier 2020-07-14 11:39:47 -04:00
.gitignore Set up project structure, docker, ci (#1) 2020-06-26 16:05:35 -04:00
.prettierignore Add prettier 2020-07-14 11:39:47 -04:00
.prettierrc.json Add prettier 2020-07-14 11:39:47 -04:00
Dockerfile Create custom api client to handle authentication (#13) 2021-02-04 17:34:43 -05:00
LICENSE Initial commit 2020-06-25 18:28:35 -04:00
README.md Create custom api client to handle authentication (#13) 2021-02-04 17:34:43 -05:00
package.json Create custom api client to handle authentication (#13) 2021-02-04 17:34:43 -05:00
yarn.lock Bump hosted-git-info from 2.8.8 to 2.8.9 (#16) 2021-05-26 14:02:39 -04:00

README.md

App Store Analytics Export

Scripts for exporting app analytics to BigQuery. The export will export individual metrics grouped by a single dimension and load each metric and dimension combination into a single table. Metrics and dimensions that will be exported can be found in the metric metadata file.

A username and password for App Store Connect is required to use the script.

Adding Metrics To Export

To add new metrics to export, add an entry to metricData in analytics_export/tableMetadata.js. The dimensions for the metrics will be automatically detected.

This job exports a table for each metric and dimension combination. This script in bigquery-etl generates sql that combines all the metrics by dimension, creating one table per dimension. The script checks for existing tables in BigQuery so it must be run after the new metrics have been exported at least once.

Official documentation of metrics and dimensions can be found at https://help.apple.com/app-store-connect/#/itc21781223f

Usage

This project uses yarn to manage dependencies and was developed with nodejs 12.

To install dependencies use:

yarn

To run the export use yarn export. Use yarn export --help to view supported options.

e.g.

yarn export \
    --username=u \
    --password=p \
    --app-id=123 \
    --app-name=app \
    --start-date=2020-01-01 \
    --project=test-project \
    --dataset=test-dataset

ESLint and Prettier are used for code formatting and linting. Lint check can be run with:

yarn lint

And automatic fixing can be done with:

yarn lint-fix && yarn pretty

Tests are run with mocha:

yarn test