> 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/analytics/advanced-ad-events.md).

# Advanced Ad Events

### Overview

Use Ad events to track when the game loads and players interact with each ad type and placement.

This event type can be used to calculate metrics such as how many players watched each ad placement type or how many ad failures they experienced.

### Available Events

**Reward Video**

* `reward_video_opportunity`
* `reward_video_tryshow`
* `reward_video_show`
* `reward_video_show_fail`
* `reward_video_clicked`
* `reward_video_end`
* `reward_video_collect`
* `reward_video_load`
* `reward_video_load_fail`
* `reward_video_revenue_paid`

**Interstitial**

* `interstitial_tryshow`
* `interstitial_show`
* `interstitial_clicked`
* `interstitial_end`
* `interstitial_show_fail`
* `interstitial_load_fail`
* `interstitial_load`
* `interstitial_revenue_paid`

**Banner**

* `banner_show`
* `banner_revenue_paid`

### Critical Parameters

* Required
  * `placement`: placement of the ad. For interstitials, the value should help identify the timing/stage/state where the ad is triggered
* Optional
  * `reward`: only applies to the `reward_video_collect` event. It’s an optional parameter, but we highly recommend including it to inform any sink and source data and analysis.

### Example

Games that have any one of the ad types (e.g. interstitial, RV) are applicable.

### Implementation

![Ad Events Flow Chart](/files/pZdZ6mw4uvP1Ac51TN09)

**Example: Rewarded Video Event Order**

1. `reward_video_load` —> Ad SDK **loaded** a video
2. `reward_video_load_fail` —> Ad SDK **failed** to load a video
3. `reward_video_show` —> Ad is requested to be shown to the player
4. `reward_video_start` —> Ads SDK **started** the video
5. `reward_video_show_fail` —> The video **failed** to display to the player
6. `reward_video_clicked` —> Player **clicked** the video
7. `reward_video_hide` —> Player chose to **hide** the video
8. `reward_video_end` —> Video reached the **end**
9. `reward_video_collect` —> Player **collected** a reward for watching the video
10. `reward_video_revenue_paid` —> The revenue for the ad was received. The position of this in the event order is not guaranteed.

The other ad types follow the same convention. Unless you are troubleshooting, the `*_show`, `*_end`, and `*_collect` events are probably the most important events to add to your game.


---

# 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/analytics/advanced-ad-events.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.
