> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.brevo.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.brevo.com/_mcp/server.

#### Legacy Tracker Documentation

For the legacy tracker doc, check our guide [here](https://tracker-doc.brevo.com/docs/getting-started-1).

Custom events are events you choose to track. They are custom in the sense that you can give them any name you want.

Use them in various situations — for example, in an eCommerce shop, to track cart events. The syntax is:

```javascript
Brevo.push([
  "track",
      event_name, 	/* mandatory */
      properties,	/* optional */
      event_data	/* optional */
]);
```

Parameters:

| Attribute    | Datatype    | Description                                          | Value                                                                   |
| :----------- | :---------- | :--------------------------------------------------- | :---------------------------------------------------------------------- |
| `event_name` | String      | Name of your event                                   | `"cart_updated"`                                                        |
| `properties` | JSON object | Describes the state of the visitor                   | `{"email": "john.doe@email.com","FIRSTNAME": "John","LASTNAME": "doe"}` |
| `event_data` | JSON object | JSON object used to pass information about the event | See example below                                                       |

Example `event_data`:

```javascript
event_data = {  
    "id": "cart:1234",  
    "data": {  
        "total": 280,  
        "currency": "USD",  
        "url": "www.example.com",  
        "items": [{  
                "name": "Black shoes",  
                "price": 90,  
                "quantity": 2,  
                "url": "www.example.com/black-shoes",  
                "image": "www.example.com/black-shoes.jpg"  
            }  
        ]  
    }  
}
```

**Example**

```javascript
var event_name = "cart_updated";
var properties = {
	"email": "john.doe@email.com",
	"FIRSTNAME": "John",
	"LASTNAME": "doe"
}

var event_data = {  
    "id": "cart:1234",  
    "data": {  
        "total": 280,  
        "currency": "USD",  
        "url": "www.example.com",  
        "items": [{  
                "name": "Black shoes",  
                "price": 90,  
                "quantity": 2,  
                "url": "www.example.com/black-shoes",  
                "image": "www.example.com/black-shoes.jpg"  
            }  
        ]  
    }  
}

Brevo.push([
  "track",
      event_name, 	/* mandatory */
      properties,	/* optional */
      event_data	/* optional */
]);
```