# Post viewed

Learn how to check if a user has viewed posts.

This expression checks whether the user has viewed a post based on [post viewed](/reference/event/types/engagement/post-viewed) event. Posts represent blog articles or similar content that users can read or interact with.

## Syntax

The basic syntax for this expression is:

```cql
user has viewed post
```

You can optionally include the article for better readability:

```cql
user has viewed a post
```

The negation of the expression can be expressed as:

```cql
user has not viewed post
```

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

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

## Parameters

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

  Additional [filtering criteria](#event-properties) for the post view event.

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

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

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

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

## Event properties

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

- `id`: `string`

  The unique identifier of the blog post. For example, "croct-launches-new-sdk".

- `title`: `string`

  The title of the post. For example, "Croct launches new SDK".

- `publishTime`: `Date`

  The time of the post publication, in milliseconds since Unix ep

- `url`: `string|null`

  The URL of the post page.

- `tags`: `Array<string>`

  The set of tags associated with the post. For example, "startup", "product", "dev-tools".

- `categories`: `Array<string>`

  The categories the post belongs to. For example, "news", "updates", "releases".

- `authors`: `Array<string>`

  The authors of the post. For example, "John Doe", "Jane Smith".

## Examples

You can check whether a user has viewed any post:

```cql
user has viewed post
```

Or verify they have not viewed any post:

```cql
user has not viewed post
```

You can also check if the user viewed a specific post by title:

```cql
user has viewed post with title "Personalization strategies"
```

Or check how many times posts were viewed:

```cql
user has viewed post exactly 3 times
```

You can even filter by time, such as checking if a post was viewed today:

```cql
user has viewed post today
```

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

```cql
user has viewed post with title "Personalization strategies" exactly 2 times last week
```

> **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/engagement/post-viewed): Learn more about this event.
