> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gleap.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Callbacks

Set callbacks for different actions to get notified on certain state changes of the Gleap widget. This enables you to create an even deeper integration with Gleap.

```csharp theme={null}
Gleap.RegisterListener("feedbackFlowStarted", flow =>
{
    // Do something with the flow
});
```

```csharp theme={null}
Gleap.RegisterListener("initialized", _ =>
{
    // Do something when Gleap is initialized
});
```

```csharp theme={null}
Gleap.RegisterListener("notificationCountUpdated", count =>
{
    // Do something with the count
});
```

```csharp theme={null}
Gleap.RegisterListener("feedbackSent", _ =>
{
    // Do something
});
```

```csharp theme={null}
Gleap.RegisterListener("feedbackSendingFailed", _ =>
{
    // Do something
});
```

```csharp theme={null}
Gleap.RegisterListener("widgetOpened", _ =>
{
    // Do something
});
```

```csharp theme={null}
Gleap.RegisterListener("widgetClosed", _ =>
{
    // Do something
});
```

You can detach a listener again with `Gleap.RemoveListener(eventName, handler)`.
