Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 52 additions & 20 deletions content/rn-codepush/codepush-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,71 @@ description: Installation and usage metrics for OTA updates
weight: 8
---

Customers using a CodePush server managed by Codemagic get access to analytics about their monthly usage as well as detailed deployment metrics on the OTA Updates page.
CodePush analytics are available via the dashboard, CLI or API, so you can use the one suitable to your workflow.

These metrics allow developers to:
## Accessing your metrics

- monitor update adoption
- detect installation problems
- evaluate rollout success
- understand overall OTA usage
### Dashboard

Analytics are typically visible in the Codemagic **OTA Updates dashboard**.
The Codemagic OTA Updates dashboard gives a visual overview of your team's OTA activity.

These insights help teams decide when to proceed with a rollout, adjust or halt rollout using the CodePush CLI, or roll back—see [Production control](/rn-codepush/production-control/).
The main page shows team-level totals for the current month:

## Usage analytics
- **Downloads** - total update downloads across all projects
- **Installs** - total successful installs across all projects

The main OTA Updates page gives an overview of your team's OTA usage across all projects (apps), grouped by month.
It also includes a time-series chart of succeeded and failed installs, updated hourly.

* **Downloads** - the total number of update downloads across all projects in a given month
* **Installs** - the total number of successful update installs across all projects in a given month
Each project is listed below with its latest release and per-release download, install, and failure counts. Clicking through to a project shows time-series charts for downloads, installs, and failures broken down by release version, with a configurable date range.

Additionally, the page includes an installation chart showing the daily number of successful and failed installs, helping you understand when end users install updates and identify trends or potential issues.
### CLI

{{<notebox>}}
**Note**: Data on the page is updated hourly.
{{</notebox>}}
You can view per-release metrics directly in the terminal. `deployment ls` shows the latest release for each deployment along with its current install metrics:

## Projects and release metrics
| **Metric** | **Description** |
| --- | --- |
| Active | Users currently running this release |
| Total | All successful installs since release |
| Pending | Downloaded but not yet installed |
| Rollbacks | Automatic client-side rollbacks |

Your projects (apps) on the server are listed in the **Projects** section of the OTA Updates page.
Run the following command to list deployment metrics for an app:

To view detailed metrics for a specific project and deployment channel, click the **arrow** icon next to the project and select the desired **Deployment channel** at the top of the page.
{{< highlight bash "style=paraiso-dark">}}
code-push deployment ls MyApp-Android
{{< /highlight >}}

`deployment history` shows the same metrics for all recent releases in a deployment, useful for comparing adoption across versions:

{{< highlight bash "style=paraiso-dark">}}
code-push deployment history MyApp-Android Production
{{< /highlight >}}

### API

The [REST API](https://codemagic.io/api/v3/schema#tag/over-the-air-updates/GET/api/v3/ota/deployments/{deployment_id}/releases) provides time-series usage data for integrating CodePush metrics into external dashboards or observability tooling.

Per-deployment metrics are available for a configurable date range:

| **Metric** | **Description** |
| --- | --- |
| download_count | Update downloads over the period |
| deployment_succeeded_count | Successful installs over the period |
| deployment_failed_count | Failed installs over the period |

{{< highlight bash "style=paraiso-dark">}}
curl 'https://codemagic.io/api/v3/ota/deployments/{deployment_id}/releases?page_size=30&page=1' \
--header 'x-auth-token: YOUR_SECRET_TOKEN'
{{< /highlight >}}

Team-level usage is also available, aggregating across all projects:

{{< highlight bash "style=paraiso-dark">}}
curl 'https://codemagic.io/api/v3/ota/{team_id}/usage?period_from=&period_to=' \
--header 'x-auth-token: YOUR_SECRET_TOKEN'
{{< /highlight >}}

The page then lists all updates to the project for the selected deployment channel and shows the number of downloads, successful installs, and failed installs for each update. You can also select a time period at the top of the page to track adoption trends over time.
See the [REST API reference](/codemagic-rest-api/api-overview/) for the full endpoint list.

## Deployment health

Expand Down
5 changes: 5 additions & 0 deletions content/rn-codepush/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ These updates modify only the JavaScript bundle, so they can be safely delivered

These changes affect compiled native code, so they must go through the App Store or Play Store.

### Delta updates

CodePush uses delta updates (file-level diffs) for each release and delivers only the JavaScript files and assets that changed.

Instead of redownloading a complete bundle and all static assets on every update, users receive a smaller delta package. This keeps OTA updates faster and reduces bandwidth usage.

## How the update flow works

Expand Down
8 changes: 7 additions & 1 deletion content/rn-codepush/releasing-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Think of this as a single pipeline with two decision points:

CodePush delivers only JavaScript runtime assets and the files required by the application’s JS layer.

A typical update includes:
A typical update includes only changed files and assets, such as:

* JavaScript bundle
* Static assets (images, fonts, etc.)
Expand All @@ -95,6 +95,12 @@ CodePush does not include native binaries such as **.apk** or **.ipa** files. OT

Any modification involving native code (e.g. Swift, Objective-C, Java, Kotlin, or native modules) must be released through the App Store or Google Play.

### Delta updates

CodePush uses delta updates (file-level diffs) for each release and delivers only the files or assets that changed.

This means users download a lightweight delta package instead of the full JavaScript bundle and all assets every time, resulting in faster updates and smaller downloads for users.

## Version control

CodePush uses a two-layer versioning model that separates native app versions from JavaScript update versions. This ensures updates are only delivered to compatible app binaries while still allowing fast OTA iteration.
Expand Down
7 changes: 0 additions & 7 deletions content/rn-codepush/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,6 @@ This single command:

For the full release workflow, see [Releasing updates](/rn-codepush/releasing-updates/).

✅ Best Practices
* Use Environment Variables – Avoid hardcoding deployment keys.
* Separate Staging and Production Keys – Always validate updates in Staging before promoting to Production.
* Confirm Connectivity – After configuration, make sure the app can fetch updates from the server by testing a Staging release.

Properly configuring the server URL and deployment keys ensures that CodePush can deliver OTA updates reliably and safely for each platform.

## Next steps

After completing setup, use the following sections to continue:
Expand Down
3 changes: 3 additions & 0 deletions content/yaml-quick-start/building-a-react-native-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ If you are going to publish your app to App Store Connect or Google Play, each u

{{< include "/partials/publishing-android-ios.md" >}}

## OTA Updates with CodePush

Our hosted CodePush service lets you publish OTA updates for React Native projects directly to users' devices, without going via the App Store or Google Play. Read the [concepts page](../rn-codepush/concepts/) for how it works, or the [setup page](../rn-codepush/setup/) to get started.

## Conclusion
Having followed all of the above steps, you now have a working `codemagic.yaml` file that allows you to build, code sign, automatically version and publish your project using Codemagic CI/CD.
Expand Down