Skip to content

Commit d975b7a

Browse files
da2glclaude
andauthored
docs: document Ad Revenue Callbacks in README (#174) (#177)
Ad Revenue Callbacks have been supported since 3.8.1 via the AppodealSdkEvents.AD_REVENUE event (payload: AppodealAdRevenue), but were not documented. Add a usage section and a Table of Contents entry. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 57ad95e commit d975b7a

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Official Appodeal React Native Plugin for your React Native application.
6060
- [Usage](#usage)
6161
- [Initialisation](#initialisation)
6262
- [Callbacks](#callbacks)
63+
- [Ad Revenue Callbacks](#ad-revenue-callbacks)
6364
- [Presentation](#presentation)
6465
- [Ad Components](#ad-components)
6566
- [Privacy Policy and Consent](#privacy-policy-and-consent)
@@ -702,6 +703,43 @@ Appodeal.addEventListener(AppodealRewardedEvents.CLICKED, () => {
702703
});
703704
```
704705

706+
### Ad Revenue Callbacks
707+
708+
The Appodeal SDK provides impression-level ad revenue data (network name, revenue, ad
709+
type, currency, etc.). This data can be forwarded to your mobile measurement partner of
710+
choice, such as Firebase. If you have integrated Firebase (included in the Appodeal SDK),
711+
ad revenue data is reported automatically — see the [Firebase guide](https://docs.appodeal.com/android/services/firebase).
712+
713+
> **Minimum requirements:** Appodeal SDK 3.0.1+
714+
715+
Subscribe with the `AppodealSdkEvents.AD_REVENUE` event. The handler receives an
716+
`AppodealAdRevenue` object:
717+
718+
```javascript
719+
import Appodeal, {
720+
AppodealSdkEvents,
721+
type AppodealAdRevenue,
722+
} from 'react-native-appodeal';
723+
724+
Appodeal.addEventListener(
725+
AppodealSdkEvents.AD_REVENUE,
726+
(revenue: AppodealAdRevenue) => {
727+
console.log('Ad revenue received:', {
728+
networkName: revenue.networkName,
729+
adUnitName: revenue.adUnitName,
730+
placement: revenue.placement,
731+
revenue: revenue.revenue,
732+
currency: revenue.currency,
733+
revenuePrecision: revenue.revenuePrecision,
734+
demandSource: revenue.demandSource,
735+
adType: revenue.adType,
736+
});
737+
}
738+
);
739+
```
740+
741+
Docs: [Android](https://docs.appodeal.com/android/advanced/ad-revenue-callback) · [iOS](https://docs.appodeal.com/ios/advanced/ad-revenue-callback).
742+
705743
### Presentation
706744

707745
> Note: All presentation specific methods are available only after SDK initialization

0 commit comments

Comments
 (0)