# Flag events

### Definition

Flag events in Reflag are generated automatically in some cases, and are sent by the client in others. Reflag uses these events to track [flag access](https://docs.reflag.com/product-handbook/feature#access) and collects data usable to debug rule and context issues.

### Access evaluated

This event is generated automatically on Reflag side when the client uses server-side feature evaluation (e.g. when using [@reflag/browser-sdk](https://docs.reflag.com/supported-languages/browser-sdk) or [@reflag/react-sdk](https://docs.reflag.com/supported-languages/browser-sdk)) or on client side when local evaluation is used (e.g. using local mode in [@reflag/node-sdk](https://docs.reflag.com/supported-languages/node-sdk)).

This events contains the following information:

* The **actual context** that was used to evaluate the flag access,
* Some details of the **flag** whose access rules were evaluated,
* The **result** of the access evaluation, including **missing fields** that were expected in the [targeting rules](https://docs.reflag.com/product-handbook/concepts/targeting-rules).

### Access checked

This event is generated by all Reflag SDKs whenever the client code checks if a flag is enabled for a given context.

This events contains the following information:

* The **actual context** that was used to evaluate the flag access,
* Some details of the **flag**,
* The **result** of the access check.

{% hint style="info" %}
Reflag SDKs rate-limit generation of these events to avoid unnecessary traffic. Also, unknown flag evaluations and checks are also sent to Reflag facilitating debugging.
{% endhint %}

### Next steps

* Learn about [targeting rules](https://docs.reflag.com/product-handbook/concepts/targeting-rules),
* Learn how to [setup flag access rules](https://docs.reflag.com/product-handbook/feature-rollouts/feature-targeting-rules) within Reflag UI.
