# Flag events

### Definition

Flag events in Reflag are generated automatically in some cases and sent by the client in others. Reflag uses these events to track [flag access](/product-handbook/concepts/feature.md#access) and collect data that helps debug rule and context issues.

### Access evaluated

This event is generated automatically on the Reflag side when the client uses server-side flag evaluation, for example with [@reflag/browser-sdk](/supported-languages/browser-sdk.md) or [@reflag/react-sdk](/supported-languages/browser-sdk.md). It is generated on the client side when local evaluation is used, for example with local mode in [@reflag/node-sdk](/supported-languages/node-sdk.md).

This event 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](/product-handbook/concepts/targeting-rules.md).

### Access checked

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

This event 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 these events to avoid unnecessary traffic. Unknown flag evaluations and checks are still sent to Reflag to help with debugging.
{% endhint %}

### Next steps

* Learn about [targeting rules](/product-handbook/concepts/targeting-rules.md),
* Learn how to [set up flag access rules](/product-handbook/feature-rollouts/feature-targeting-rules.md) within Reflag UI.


---

# 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.reflag.com/product-handbook/concepts/feature-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.
