# Events

Here you can find a detailed overview of all events with example data that are sent to VWO.

## View product <a href="#view-product" id="view-product"></a>

Triggered when a customer views a product detail page.

```json
{
    "event": "view_product",
    "product_id": "SW-10001",
    "product_name": "Jeans",
    "price": 49.99,
    "currency": "EUR",
    "category": "Clothing > Pants > Jeans",
    "categoryLevel1": "Clothing",
    "categoryLevel2": "Pants",
    "categoryLevel3": "Jeans",
    "categoryLevel4": null,
    "categoryLevel5": null,
    "brand": "Denim Co.",
    "sku": "SW-10001",
    "ean": "4006381333931",
    "quantity": 1,
    "variant": "Blue/32",
    "stock": 25,
    "available": true
}
```

## Add to cart <a href="#add-to-cart" id="add-to-cart"></a>

Triggered when a customer adds a product to the cart.

```json
{
    "event": "add_to_cart",
    "product_id": "SW-10001",
    "quantity": 2,
    "total_price": 99.98,
    "currency": "EUR",
    "product_name": "Jeans"
}
```

## Remove from cart <a href="#remove-from-cart" id="remove-from-cart"></a>

Triggered when a customer removes a product from the cart.

```json
{
    "event": "remove_from_cart",
    "product_id": "SW-10001",
    "quantity": 1,
    "total_price": 49.99,
    "currency": "EUR",
    "product_name": "Jeans"
}
```

## View cart <a href="#view-cart" id="view-cart"></a>

Triggered when a customer views the cart page.

```json
{
    "event": "view_cart",
    "products": [
        {
            "product_id": "SW-10001",
            "quantity": 2,
            "total_price": 99.98,
            "currency": "EUR",
            "product_name": "Jeans"
        }
    ],
    "totalPrice": 99.98,
    "totalTax": 15.96,
    "coupon": "DISCOUNT-20"
}
```

## Purchase <a href="#purchase" id="purchase"></a>

Triggered when a customer completes an order.

```json
{
    "event": "purchase",
    "orderId": "10001",
    "totalPrice": 99.98,
    "totalTax": 15.96,
    "currency": "EUR",
    "coupon": null,
    "affiliation": null,
    "products": [
        {
            "product_id": "SW-10001",
            "product_name": "Jeans",
            "price": 49.99,
            "quantity": 2,
            "currency": "EUR",
            "category": "Clothing",
            "brand": "Denim Co.",
            "sku": "SW-10001",
            "variant": "Blue/32"
        }
    ]
}
```

## Login <a href="#login" id="login"></a>

Triggered when a customer logs in to their account.

```json
{
    "event": "login"
}
```

## Sign up <a href="#sign-up" id="sign-up"></a>

Triggered when a customer registers a new account.

```json
{
    "event": "signUp"
}
```


---

# Agent Instructions: 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:

```
GET https://docs.shop-studio.io/shopware/extensions/vwo/events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
