# Page viewed

Learn how to check if a user has viewed pages.

This expression checks whether a user has visited one or more pages based on [Page opened](/reference/event/types/web-browsing/page-opened) events.

## Syntax

The basic syntax for this expression is:

```cql
user has viewed page
```

You can optionally include the article for better readability:

```cql
user has viewed a page
```

The negation of the expression can be expressed as:

```cql
user has not viewed a page
```

You can refine the expression with filters, quantifiers, and time windows:

```cql
user has viewed a page /*<criteria>*/ /*<quantifier>*/ /*<window>*/
```

## Parameters

- `criteria`: [`Criteria`](/reference/cql/expressions/events/criteria/overview) (optional)

  Additional [filtering criteria](#event-properties) for the page viewed event.

- `quantifier`: [`Quantifier`](/reference/cql/expressions/events/quantifier) (optional)

  A quantifier to specify how many times the page must have been viewed.

- `window`: [`TimeWindow`](/reference/cql/expressions/events/time-window) (optional)

  The time window during which the page must have been viewed.

## Event properties

The following event properties can be used within [criteria expressions](/reference/cql/expressions/events/criteria/overview):

- `url`: `string`

  The URL of the page.

- `referrer`: `string|null`

  The URL of the page that linked to the current page. The value is `null` if the user accessed the page directly.

## Examples

You can check whether a user has viewed a page:

```cql
user has viewed a page
```

Or verify they have not viewed any page:

```cql
user has not viewed a page
```

You can also check if the user viewed a specific page URL:

```cql
user has viewed a page with url "https://croct.com"
```

Or check how many times pages were viewed:

```cql
user has viewed a page exactly 3 times
```

You can even filter by time, such as checking if a page was viewed yesterday:

```cql
user has viewed a page yesterday
```

Combine criteria, counts, and time windows in one expression:

```cql
user has viewed a page with url "https://croct.com" at least 2 times
```

> **Scale plan**
>
> This feature is available only to accounts on the Scale plan. See the [pricing page](https://croct.com/pricing) for more information.

## Explore

- [Audiences](/explanation/audience): Understand how to delivery content to specific groups of users.
- [Event tracking](/reference/event/types/web-browsing): Learn more about web browsing events.
