> For the complete documentation index, see [llms.txt](https://docs.reflag.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reflag.com/product-handbook/concepts/feature-events.md).

# 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](https://docs.reflag.com/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](https://docs.reflag.com/supported-languages/browser-sdk.md) or [@reflag/react-sdk](https://docs.reflag.com/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](https://docs.reflag.com/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](https://docs.reflag.com/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](https://docs.reflag.com/product-handbook/concepts/targeting-rules.md),
* Learn how to [set up flag access rules](https://docs.reflag.com/product-handbook/feature-rollouts/feature-targeting-rules.md) within Reflag UI.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.reflag.com/product-handbook/concepts/feature-events.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
