> For the complete documentation index, see [llms.txt](https://docs.wortise.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wortise.com/en/flutter-sdk/sdk-integration/revenue-reporting.md).

# Revenue reporting

## Implementation

Since version **1.7.0**, apps can receive an estimated revenue that has likely been generated by an ad.

To do this, it is just needed to implement the corresponding listener for each ad format, as shown in the example below:

```dart
BannerAd(
  ...
  listener: (event, args) {
    if (event == BannerAdEvent.REVENUE_PAID) {
      // El anuncio ha sido generado un ingreso
    }
  },
)
```

The listener receives an object as argument that contains the following fields:

<table><thead><tr><th width="139.62109375">Field</th><th width="175.20703125">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>revenue</code></td><td><code>Map</code></td><td>The revenue generated by the ad</td></tr><tr><td><code>source</code></td><td><code>String</code></td><td>The revenue source</td></tr></tbody></table>

In addition, the `revenue` object contains the following fields that represent the revenue:

<table><thead><tr><th width="140.49609375">Field</th><th width="175.171875">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>currency</code></td><td><code>String</code></td><td>The currency corresponding to the revenue</td></tr><tr><td><code>precision</code></td><td><code>String</code></td><td>The accuracy of the information. It can be <code>ESTIMATED</code>, <code>PRECISE</code> or <code>PUBLISHER_DEFINED</code></td></tr><tr><td><code>value</code></td><td><code>double</code></td><td>The revenue value</td></tr></tbody></table>

## Integration with Firebase

Below, a basic example is shown of how to report the revenue information to Firebase:

```dart
final analytics = FirebaseAnalytics();

BannerAd(
  ...
  listener: (event, args) {
    if (event == BannerAdEvent.REVENUE_PAID) {
      analytics.logEvent(
        name: 'ad_revenue',
        parameters: {
          'currency':  args['revenue']['currency'],
          'precision': args['revenue']['precision'],
          'source':    args['source'],
          'value':     args['revenue']['value'],
        },
      );
    }
  },
)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wortise.com/en/flutter-sdk/sdk-integration/revenue-reporting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
