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
Try in Playground

You can optionally include the article for better readability:

user has viewed a page
Try in Playground

The negation of the expression can be expressed as:

user has not viewed a page
Try in Playground

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

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

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
Try in Playground

Or verify they have not viewed any page:

user has not viewed a page
Try in Playground

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

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

Or check how many times pages were viewed:

user has viewed a page exactly 3 times
Try in Playground

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

user has viewed a page yesterday
Try in Playground

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

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