analytics command group provides access to App Store analytics data and sales reports. You can request analytics reports, check their status, and download the generated data.
Overview
Analytics reports provide insights into app performance, user engagement, and sales data. The workflow involves:- Creating a report request (one-time or ongoing)
- Checking request status and available reports
- Downloading report data for analysis
Sales Reports
Download sales and trends reports directly without creating a request.Download Sales Report
--vendor- Vendor number (orASC_VENDOR_NUMBERenv)--type- Report type:SALES,PRE_ORDER,NEWSSTAND,SUBSCRIPTION,SUBSCRIPTION_EVENT--subtype- Report subtype:SUMMARY,DETAILED--frequency- Frequency:DAILY,WEEKLY,MONTHLY,YEARLY--date- Report date (format depends on frequency)
- Daily:
YYYY-MM-DD - Weekly:
YYYY-MM-DD(Monday start or Sunday end) - Monthly:
YYYY-MM - Yearly:
YYYY
--version- Report format version:1_0(default),1_1,1_3--output- Custom output path (default:sales_report_{date}_{type}.tsv.gz)--decompress- Decompress to.tsvformat
Analytics Report Requests
Create Request
Create a new analytics report request to access detailed analytics data.--app- App ID (orASC_APP_IDenv)--access-type-ONGOINGfor continuous access orONE_TIME_SNAPSHOTfor single request
- ONGOING: Continuous access to analytics data (recommended)
- ONE_TIME_SNAPSHOT: Single-use request for a specific time period
List Requests
View all analytics report requests for an app.--request-id- Filter by specific request ID--state- Filter by state:PROCESSING,COMPLETED,FAILED--limit- Results per page (1-200)--paginate- Fetch all pages automatically--next- Pagination URL from previous response
Get Reports
Retrieve available analytics reports and instances for a request.--request-id- Analytics report request ID
--instance-id- Filter by specific report instance--date- Filter instances by date (YYYY-MM-DD)--include-segments- Include download URLs for report segments--limit- Results per page (1-200)--paginate- Fetch all reports (recommended with--date)--next- Pagination URL
Download Report Data
Download analytics report data files.--request-id- Analytics report request ID--instance-id- Report instance ID
--segment-id- Specific segment ID (required if multiple segments)--output- Custom output path (default:analytics_report_{requestId}_{instanceId}.csv.gz)--decompress- Decompress to.csvformat
Delete Request
Delete an analytics report request.--request-id- Request ID to delete--confirm- Confirm deletion
Report Metadata
List Report Instances
List instances for a specific report.Get Report Details
Get detailed information about a specific analytics report.View Relationships
List instance relationships for a report.Report Segments
Large analytics reports are split into segments for download.List Segments
--limit- Results per page (1-200)--paginate- Fetch all segments--next- Pagination URL
Get Segment Details
Vendor Number
Sales reports require a vendor number, which identifies your organization in App Store Connect. Finding Your Vendor Number:- Sign in to App Store Connect
- Go to Payments and Financial Reports
- Your vendor number appears in the top right
Report Formats
Sales Reports (TSV)
Sales reports are tab-separated value files compressed with gzip:--decompress to extract the .tsv file for analysis.
Analytics Reports (CSV)
Analytics reports are comma-separated value files:Common Workflows
Weekly Sales Analysis
Analytics Data Pipeline
Related Commands
- Finance - Download financial reports
- Insights - Weekly and daily insights from analytics and sales data
- Performance - Access performance metrics and diagnostics
