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

# Generating Impressions

> Learn how FlagSync captures impressions to track feature flag exposure.

## How Are Impressions  Generated?

Impressions are automatically logged each time a flag is evaluated with the `flag` function, capturing the variant served to the user.

```typescript theme={null}
client.flag<T>(flagKey: string, defaultValue?: T);
```

### Example

For a flag like `signup-cta` with variants `Join Now`, `Register`, `Sign Up`:

```typescript theme={null}
const value = client.flag('signup-cta', 'Register');
console.log(`signup-cta is ${value}`);
```

<Check>
  If **User ABC** is shown `Join Now`, an impression is logged *"User ABC saw `Join Now` for `signup-cta`."*
</Check>

## Next Steps

* Review impressions in [Impressions: Overview](/impressions/overview).
* Set up flags in [Quickstart: Integrate the SDK](/quickstarts/sdk).
* Explore [Experiments](/experiments/overview) for variant testing.
