> For the complete documentation index, see [llms.txt](https://docs.exoclick.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exoclick.com/publishers/ru/saity-i-zony/dfi-mfi-html-events.md).

# Добавление HTML-событий для полноэкранных интерстициалов

Максимальное **Desktop Fullpage Interstitial** и **Мобильный Fullpage Interstitial** Форматы рекламы могут взаимодействовать с вашим сайтом через некоторые HTML-события. Вы можете отслеживать эти события, чтобы запускать дополнительные действия на вашем сайте.

## creativeDisplayed

Когда реклама Fullpage Interstitial загружается в браузере пользователя, она генерирует событие `creativeDisplayed-XXXXXXX`, где `XXXXXXX` является идентификатором зоны, соответствующим этой зоне рекламы Fullpage Interstitial.

Этот обработчик событий позволяет программно выполнять любые действия, которые могут понадобиться на вашем сайте, и получать больше информации об элементе, который вызвал событие, например URL, id, классы и текст.

В примере ниже мы отображаем `Креатив показан!` сообщение в консоли, когда Fullpage Interstitial отображается, и перечисляем все сведения об элементе, который вызвал событие:

```js
<script async type="application/javascript" src="https://a.pemsrv.com/ad-provider.js"></script>
<ins class="eas6a97888e35" data-zoneid="1234567"></ins>
<script>(AdProvider = window.AdProvider || []).push({"serve": {}});</script>

<a href="https://www.exoclick.com">Посетите exoclick.com!</a>

<script type="application/javascript">
    document.addEventListener('creativeDisplayed-1234567', function (e) {
        console.log("Креатив показан!");
        console.log(e.detail);
    }, false);
</script>
```

## message

Если ваша зона рекламы Fullpage Interstitial обслуживает кампанию iframe, тогда вы можете добавить обработчик событий к событию `message`. Это позволяет программно выполнять любые действия, которые могут понадобиться на вашем сайте, после загрузки iframe в браузере пользователя.

Данные события содержат свойства `id`, которое представляет собой md5 от параметра URL iframe, и `loaded` значением true. В примере ниже мы отображаем `Iframe загружен!` сообщение в консоли, когда iframe отображается в браузере пользователя:

```js
<script async type="application/javascript" src="https://a.pemsrv.com/ad-provider.js"></script>
<ins class="eas6a97888e35" data-zoneid="1234567"></ins>
<script>(AdProvider = window.AdProvider || []).push({"serve": {}});</script>

<a href="https://www.exoclick.com">Посетите exoclick.com!</a>

<script type="application/javascript">
    window.addEventListener('message', function(event) {
        if (event.data.id && event.data.loaded) {
            console.log("Iframe загружен!")
        }
    });
</script>
```


---

# 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.exoclick.com/publishers/ru/saity-i-zony/dfi-mfi-html-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.
