> For the complete documentation index, see [llms.txt](https://docs.chartbeat.com/cbp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chartbeat.com/cbp/feature-integrations/push-alerts.md).

# Push Alerts

Chartbeat’s Mobile SDKs integrate Chartbeat analytics with your native iOS, Android, or React Native apps. Beginning with iOS SDK version [1.3.0](https://cocoapods.org/pods/Chartbeat), Android SDK version [1.4.0](https://bintray.com/chartbeat-labs/maven/com.chartbeat.androidsdk), and React Native SDK version [1.0.2](https://www.npmjs.com/package/chartbeat-react-native-bridge-sdk), the Chartbeat native app integration provides support for tracking push notifications.

For general SDK documentation, please reference [this page](/cbp/tracking/mobile-app-sdks.md). For more information on referrers for native app traffic, please reference [this page](https://help.chartbeat.com/hc/en-us/articles/360051142693-FAQ-What-is-the-Deep-links-push-alerts-referrer-and-how-does-Chartbeat-categorize-traffic-sources-for-our-native-mobile-app-visitors).

<figure><img src="https://225322705-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LYD2YiVXfNNRnSgJXb4%2Fuploads%2FVcowJnwfzZOy9K4mTKgd%2Fimage.png?alt=media&amp;token=9e48694a-ba55-4a22-ba20-b58e6ff25948" alt="" width="283"><figcaption></figcaption></figure>

### setPushReferrer() Method <a href="#method" id="method"></a>

When your app responds to push notifications, use the `setPushReferrer()` method to set an identifier for the notification received. The identifier specified will be sent along with an indicator that the referrer is a push notification. These push notifications and their ids will be viewable in the Real-Time Dashboard, and "Push Alerts" will appear as a canonical referrer in the Historical Dashboard and Unified Dashboard.

### iOS <a href="#ios" id="ios"></a>

Call `setPushReferrer()` method with the ID of the push alert **before** the `trackView()` call.

#### Objective-C:

```
[[CBTracker sharedTracker] setPushReferrer:@"your_push_id"];
```

#### Swift:

```
CBTracker.shared().setPushReferrer("your_push_id")
```

### Android <a href="#android" id="android"></a>

Set metadata — including `setPushReferrer` — **after** `trackView()`, because view changes purge metadata.

#### Java

```
Tracker.setPushReferrer(“your_push_id”);
```

### React Native <a href="#android" id="android"></a>

Set article metadata **after** `setupTracker` and **before** `trackView` (or between views, as the article changes).

```
Chartbeat.setPushReferrer('your_push_id');
```

### Push Vendors <a href="#vendors" id="vendors"></a>

The push identifiers for each vendor will vary slightly. You can follow your vendor’s documentation for retrieving the push identifier to add to the Chartbeat SDK for each application.
