Skip to main content
Version: 1.3.0

Page View

Records a page view via the page() call. All properties are passed as a single properties object.

Code Example

analytics.page({
"name": "Home",
"category": "Marketing",
"url": "https://example.com/",
"referrer": "https://google.com",
"search": "shoes"
});

Event Properties

PropertyTypeConstraintsExamplesDescription
$schemastringrequired
"https://tracking-docs-demo.buchert.digital/schemas/analytics-js/page-view.json"
Defines the structure of the event.
const: "https://tracking-docs-demo.buchert.digital/schemas/analytics-js/page-view.json"
namestring
"Home"
"Product Detail"
"Checkout"
The name of the page.
categorystring
"Marketing"
"Ecommerce"
"Account"
The category of the page.
urlstring
"https://example.com/"
"https://example.com/products/123"
The full URL of the page.
referrerstring
"https://google.com"
"https://example.com/"
The URL of the page that linked to the current page.
searchstring
"shoes"
"newsletter"
The text the user searched for.
View Raw JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://tracking-docs-demo.buchert.digital/schemas/analytics-js/page-view.json",
  "title": "Page View",
  "description": "Records a page view via the page() call. All properties are passed as a single properties object.",
  "x-tracking-targets": [
    "web-segment-js",
    "web-rudderstack-js",
    "web-hightouch-js"
  ],
  "x-method": "page",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "description": "Defines the structure of the event.",
      "const": "https://tracking-docs-demo.buchert.digital/schemas/analytics-js/page-view.json"
    },
    "name": {
      "type": "string",
      "description": "The name of the page.",
      "examples": [
        "Home",
        "Product Detail",
        "Checkout"
      ]
    },
    "category": {
      "type": "string",
      "description": "The category of the page.",
      "examples": [
        "Marketing",
        "Ecommerce",
        "Account"
      ]
    },
    "url": {
      "type": "string",
      "description": "The full URL of the page.",
      "examples": [
        "https://example.com/",
        "https://example.com/products/123"
      ]
    },
    "referrer": {
      "type": "string",
      "description": "The URL of the page that linked to the current page.",
      "examples": [
        "https://google.com",
        "https://example.com/"
      ]
    },
    "search": {
      "type": "string",
      "description": "The text the user searched for.",
      "examples": [
        "shoes",
        "newsletter"
      ]
    }
  },
  "required": [
    "$schema"
  ]
}