> For the complete documentation index, see [llms.txt](https://docs.yoplanning.support/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yoplanning.support/it/accademia-di-pianificazione/yoplanning-parametrage/module-de-reservation/integration-du-module-de-reservation/doc-technique-agence-web/evenements-e-commerce-envoyes-vers-google-analytics.md).

# Eventi e-commerce inviati a Google Analytics

Una volta integrato Google Tag Manager nel tuo modulo di prenotazione, YoPlanning attiva automaticamente i seguenti eventi e-commerce se li attivi nel tuo back office.

***

### 📦 `view_item`

Si attiva cliccando sul dettaglio di un prodotto.

**Dati inviati**:

* `item_name` (nome del prodotto)

***

### 🛒 `aggiungi_al_carrello`

Si attiva quando si aggiunge una sessione o un buono regalo (GBV) al carrello.

**Dati inviati**:

```json
{
  "currency": "EUR",
  "value": 150,
  "items": [
    {
      "item_name": "Canoë 3h",
      "item_variant": "session",
      "quantity": 2
    }
  ]
}
```

***

### 💳 `begin_checkout`

Si attiva cliccando su "Paga" nell'ultima pagina.

**Dati inviati**:

```json
{
  "currency": "EUR",
  "value": 180,
  "cart_id": "YO123456"
}
```

***

### ✅ `acquisto`

Attivato al termine del pagamento. Esistono due modalità a seconda del tipo di integrazione del modulo di prenotazione.

***

#### 🔗 Modalità **Accesso diretto**

* L'evento si attiva automaticamente al termine del pagamento.
* Non è richiesta alcuna configurazione aggiuntiva.

***

#### 🧩 Modalità **iframe**

Se il modulo è integrato tramite un iframe sul tuo sito:

* Devi definire un **URL di successo** nella configurazione del modulo in YoPlanning.
* Questo URL deve essere:
  * sullo **stesso dominio** del tuo sito (ad esempio: `example.com/merci`)
  * e **includere lo script di integrazione di YoPlanning** (anche se in questa pagina non viene visualizzato alcun modulo)

Grazie a questo reindirizzamento, l'evento `acquisto` viene inviato correttamente in background.

***

#### 🧾 Dati inviati con l'evento `acquisto`

```json
{
  "currency": "EUR",
  "value": 240,
  "transaction_id": "YO654321",
  "transaction_source": "Online",
  "items": [
    {
      "item_name": "Randonnée guidée",
      "item_variant": "session",
      "price": 120,
      "quantity": 2
    }
  ]
}
```


---

# 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.yoplanning.support/it/accademia-di-pianificazione/yoplanning-parametrage/module-de-reservation/integration-du-module-de-reservation/doc-technique-agence-web/evenements-e-commerce-envoyes-vers-google-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.
