In this page

Overview

This page lists sample CQL queries for common use cases around page view tracking. They're completely standard CQL queries, so you can use them as-is, adapt them to your own needs, or freely combine them with any other CQL field or function for more complex searches.

Query samples

Last view

Who

Contents last viewed by me:

arch.event.lastViewedBy = currentUser()

Contents last viewed by a specific user:

arch.event.lastViewedBy = "123abcde95673300697be2ba"

(The alphanumeric string is the user's Atlassian account ID. How to figure out?)

Contents last viewed by specific users:

arch.event.lastViewedBy in ("123abcde95673300697be2ba", "456fabcd1238456789abcdef")

(The alphanumeric string is the user's Atlassian account ID. How to figure out?)

When

Contents not viewed in the last 100 days:

arch.event.lastViewedOn < now("-100d")

Contents last viewed before a specific date:

arch.event.lastViewedOn < "2026-08-01"

Contents last viewed in a specific period:

arch.event.lastViewedOn > "2026-01-15" and arch.event.lastViewedOn < "2026-08-01"

Contents viewed today:

arch.event.lastViewedOn >= startOfDay()

Questions?

Ask us any time.