# Link opened

Learn how to check if a user has opened a specific link.

This expression checks whether a user has clicked on a specific link based on [link opened](/reference/event/types/engagement/link-opened) event.

## Syntax

The basic syntax for this expression is:

```cql
user has opened link /*<url>*/
```

You can optionally include the article for better readability:

```cql
user has opened a link /*<url>*/
```

The negation of the expression can be expressed as:

```cql
user has not opened link /*<url>*/
```

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

```cql
user has opened link /*<url>*/ /*<criteria>*/ /*<quantifier>*/ /*<window>*/
```

## Parameters

These are the supported parameters:

- `url`: `string`

  The URL of the link that the user opened.

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

  Additional [filtering criteria](#event-properties) for the link opened event.

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

  A quantifier to specify how many times the event must have occurred.

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

  The time window during which the user has opened the link must have occurred.

## Event properties

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

- `path`: `string`

  The path of the URL.

- `query`: `map<string, string>`

  The query parameters of the URL.

- `anchor`: `string|null`

  The anchor of the URL.

## Examples

You can check whether a user has opened a link:

```cql
user has opened a link "croct.com"
```

Or check if they have not opened a link:

```cql
user has not opened a link "croct.com"
```

You can also add criteria, such as specifying a path:

```cql
user has viewed a page with url "croct.com" with path "/signup"
```

Or specifying a query string like `?key=value`:

```cql
user has viewed a page with url "croct.com" with property key of query "value"
```

You can also check how many times a link was opened:

```cql
user has opened a link "croct.com" exactly 3 times
```

You can even filter by time, such as checking if the link was opened yesterday:

```cql
user has opened a link "croct.com" yesterday
```

Combine criteria, counts and time windows in one expression:

```cql
user has opened a link "croct.com" with path "/signup" exactly 2 times today
```

> **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/link-opened): Learn more about this event.
