# Anonymous test

Learn how to check if the user is anonymous.

This test checks whether the user is anonymous, that is, whether they have not logged in or signed up yet. It is the opposite of the [identified test](/reference/cql/expressions/tests/user-session/identified).

Users are anonymous until they log in or sign up. After that, they remain [identified](/reference/cql/expressions/tests/user-session/identified) until they log out.

> **Tracking required**
>
> This test uses the signed-in, signed-up, and signed-out events to determine whether the user is anonymous. Without it, the user is treated as anonymous.

## Syntax \[#anonymous-syntax]

This test has the following syntax:

```cql
/*<user>*/ is anonymous
```

To negate the test, you can write:

```cql
/*<user>*/ is not anonymous
```

Consider using the [identified test](/reference/cql/expressions/tests/user-session/identified) instead of negating this test for better readability.

## Parameters \[#anonymous-parameters]

These are the supported parameters:

- `user`: [`User`](/reference/cql/data-types/user/user)

  The user to check whether they are anonymous.

## Examples \[#anonymous-examples]

You can check whether a user is anonymous like this:

```cql
user is anonymous
```
