> For the complete documentation index, see [llms.txt](https://lionstudios.gitbook.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lionstudios.gitbook.io/readme/features/ads/analytics.md).

# Analytics

### Overview

Lion Ads handles analytics automatically as part of the ad lifecycle. When an ad is loaded, shown, closed, rewarded, or generates revenue, the appropriate analytics events are sent automatically by the SDK.

{% hint style="warning" %}
To avoid duplicate events and incorrect reporting, these should not be sent manually from game code.
{% endhint %}

The diagram below shows the standard analytics flow handled by Lion Ads.

<figure><img src="/files/Qy7chePk90IdI4x7Y0dY" alt=""><figcaption></figcaption></figure>

At a high level:

* a try show event is sent when an interstitial or rewarded ad is attempted
* a load event is sent when an ad finishes loading
* a revenue event is sent when ad revenue is reported by MAX
* an end event is sent when the ad closes
* a reward collect event is sent for rewarded ads only

Additional metrics such as ad availability rate, time to fill, and ad view time are also included where supported.

### Events Sent Automatically

#### Lion Analytics

Lion Ads automatically sends the following Lion Analytics events:

Interstitial

* InterstitialTryShow
* InterstitialLoad
* InterstitialEnd
* InterstitialRevenuePaid

Rewarded

* RewardVideoTryShow
* RewardVideoLoad
* RewardVideoEnd
* RewardVideoCollect
* RewardVideoRevenuePaid

Banner

* BannerRevenuePaid

#### Adjust

Lion Ads automatically sends ad revenue events to Adjust using the MAX revenue callback.

#### Firebase

Lion Ads automatically sends:

* ad\_impression
* custom\_ad\_impression

### Additional Data

Lion Ads supports passing additional data through ad show calls to enrich the analytics events that are sent automatically.

This is the recommended way to include game-specific context in ad analytics without manually sending separate events.

Any additional data provided through the supported Lion Ads APIs will be included with the relevant automatically generated analytics events where applicable.

{% hint style="info" %}
Use additional data to enrich existing ad analytics events. Do not manually send duplicate analytics events just to attach extra metadata.
{% endhint %}

### Additional Data Included Automatically

Depending on the event, Lion Ads may also attach ad metadata automatically, including:

* network
* creative ID
* revenue
* ad unit
* shown
* ad availability rate
* ad time to fill
* ad view time

This data is added automatically as part of the SDK flow.

### Do Not Log These Manually

When using Lion Ads, developers should not manually log:

* Lion Analytics interstitial ad events
* Lion Analytics rewarded ad events
* Lion Analytics banner revenue events
* Adjust ad revenue events for MAX ads
* Firebase ad\_impression and custom\_ad\_impression

These are already handled by Lion Ads.


---

# 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://lionstudios.gitbook.io/readme/features/ads/analytics.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.
