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 events.

Syntax

The basic syntax for this expression is:

user has viewed page

You can optionally include the article for better readability:

user has viewed a page

The negation of the expression can be expressed as:

user has not viewed a page

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

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

Parameters

criteria(optional)

Additional filtering criteria for the page viewed event.

quantifier(optional)

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

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:

url

The URL of the page.

referrer

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:

user has viewed a page

Or verify they have not viewed any page:

user has not viewed a page

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

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

Or check how many times pages were viewed:

user has viewed a page exactly 3 times

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

user has viewed a page yesterday

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

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