Page

Represents the page context where an event occurred.

Use the Factory methods to create instances:

JSON Serialization Note: Both value (single string) and values (list) serialize to the same JSON key "value". The API distinguishes between them by JSON type:

  • Single value: "value": "search query"

  • Multiple values: "value": ["Electronics", "Phones"] This is intentional per the Topsort API contract.

Types

Link copied to clipboard
object Factory

Properties

Link copied to clipboard

Optional page identifier.

Link copied to clipboard

The type of page. Typically one of: "home", "category", "PDP", "search", "cart", "other". Use PageType enum values for type safety.

Link copied to clipboard

Optional single value associated with the page (e.g., search query, product ID). Mutually exclusive with values.

Link copied to clipboard

Optional list of values associated with the page (e.g., category hierarchy). Mutually exclusive with value.

Functions

Link copied to clipboard
open override fun toJsonObject(): JSONObject