> 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/it/siti-e-zone/dfi-mfi-html-events.md).

# Aggiungere eventi HTML per interstitial a pagina intera

Il **Interstitial Desktop Fullpage** e **Interstitial Mobile Fullpage** I formati pubblicitari possono interagire con il tuo sito web tramite alcuni eventi HTML. Puoi ascoltare questi eventi per attivare azioni aggiuntive nel tuo sito web.

## creativeDisplayed

Quando un annuncio Fullpage Interstitial viene caricato nel browser dell'utente, genera l'evento `creativeDisplayed-XXXXXXX`, dove `XXXXXXX` è l'ID della zona corrispondente a quella zona pubblicitaria Fullpage Interstitial.

Questo listener di eventi ti consente di eseguire programmaticamente qualsiasi azione di cui potresti aver bisogno sul tuo sito web e di ottenere maggiori informazioni sull'elemento che ha attivato l'evento, come l'URL, l'id, le classi e il testo.

Nell'esempio seguente, stiamo mostrando il `Creatività mostrata!` messaggio nella console quando il Fullpage Interstitial viene mostrato e stiamo elencando tutti i dettagli dell'elemento che ha attivato l'evento:

```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">Visita exoclick.com!</a>

<script type="application/javascript">
    document.addEventListener('creativeDisplayed-1234567', function (e) {
        console.log("Creatività mostrata!");
        console.log(e.detail);
    }, false);
</script>
```

## message

Se la tua zona pubblicitaria Fullpage Interstitial distribuisce una campagna iframe, puoi aggiungere un listener di eventi per l'evento `message`. Questo ti consente di eseguire programmaticamente qualsiasi azione di cui potresti aver bisogno sul tuo sito web dopo che l'iframe è stato caricato nel browser dell'utente.

I dati dell'evento contengono le proprietà `id`, che è un md5 del parametro URL dell'iframe, e `loaded` che è true. Nell'esempio seguente, stiamo mostrando il `Iframe caricato!` messaggio nella console quando l'iframe viene mostrato nel browser dell'utente:

```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">Visita exoclick.com!</a>

<script type="application/javascript">
    window.addEventListener('message', function(event) {
        if (event.data.id && event.data.loaded) {
            console.log("Iframe caricato!")
        }
    });
</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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.exoclick.com/publishers/it/siti-e-zone/dfi-mfi-html-events.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
