# 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"
}
```
