Analytics Overview
XWidget Cloud collects analytics data from your deployed apps automatically. The
xc analytics commands let you query this data from the command line to understand
how your UI is performing in the field.
Event Types
XWidget Cloud tracks four categories of events:
| Event Type | What It Measures |
|---|---|
| Downloads | Bundle downloads from the content server — how often each version is fetched by client apps |
| Renders | Fragment render events — how often each XML fragment is displayed to users |
| Errors | Fragment errors — render failures and parsing errors with error messages |
| Transitions | Page transitions — how users navigate between top-level fragments |
CLI Namespace
All analytics commands live under xc analytics:
Analytics commands require authentication. Run xc cloud login first.
Common Options
All analytics commands share a set of filtering and aggregation options:
Project Resolution
| Option | Abbr | Description |
|---|---|---|
--workspace |
-w |
Workspace to query |
--project |
-p |
Project to query (defaults to current project) |
If --project is not specified, the CLI resolves the project from xwidget_cloud.yaml
in the current directory, just like the cloud commands.
Time Range
| Option | Abbr | Description | Default |
|---|---|---|---|
--range |
-r |
Query the past N days | 7 |
Allowed values: 7, 14, 30.
Aggregation Interval
| Option | Abbr | Description | Default |
|---|---|---|---|
--interval |
-i |
Aggregation granularity | daily |
Allowed values: hourly, daily, weekly, monthly.
Note
The transitions command does not support --interval. Transition data is
aggregated over the entire range.
Dimensional Filters
These filters narrow results to a specific segment. All are optional.
| Option | Abbr | Description |
|---|---|---|
--channel |
-c |
Filter by channel name |
--version |
-v |
Filter by version number |
--platform |
-t |
Filter by device platform |
--locale |
-l |
Filter by device locale (user's region setting) |
--country |
Filter by country (geolocated from the device's IP address) |
Allowed values for --platform: android, ios, linux, macos, windows, web.
Note
--locale and --country are distinct dimensions. --locale matches the
country code from the user's device region setting, reported by the SDK.
--country matches the country the server geolocated at the time of the request.
These can differ — for example, a traveler whose phone is set to en-US visiting
France will report US for locale and FR for country.
Note
Short-form abbreviations vary slightly by command. -t for --platform is
available everywhere except transitions, where -t is reserved for --to.
-n for --country is available only on errors and downloads. Per-command
pages list the correct short forms for each subcommand.
Some commands have additional filters specific to their event type. See the individual command pages for details.
Output Format
By default, commands display results as a formatted table. Filters that you specify on the command line are displayed as a header above the table, and the remaining dimensions appear as table columns.
If no data matches your query, the CLI reports that the query returned 0 rows.