> ## Documentation Index
> Fetch the complete documentation index at: https://developer.thehaystack.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Log Page View

> Record a frontend page view. Used by the embed/Connect frontend — most API consumers do not need to call this.



## OpenAPI

````yaml POST /logging/page-views
openapi: 3.1.0
info:
  title: Haystack API
  description: Content management and semantic search API for Haystack
  version: 2.0.0
  contact:
    name: Haystack Support
    email: support@thehaystack.ai
    url: https://thehaystack.ai
servers:
  - url: https://api.thehaystack.ai/v2/haystack
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Items
    description: Content item management
  - name: Collections
    description: Top-level content organization
  - name: Series
    description: Multi-part content grouping
  - name: Speakers
    description: Content presenter management
  - name: Media
    description: Video and audio asset management
  - name: Search
    description: Semantic content search
  - name: Analytics
    description: Usage statistics and metrics
  - name: Resources
    description: Attach supplementary files, links, and videos to items
  - name: Scriptures
    description: Attach Bible references to items
  - name: Chapters
    description: Time-based chapter markers on media assets
  - name: Stats
    description: Analytics and reporting
  - name: Frontend
    description: Public frontend configuration
paths:
  /logging/page-views:
    post:
      tags:
        - Analytics
      summary: Log page view
      description: >-
        Record a frontend page view. Used by the embed/Connect frontend — most
        API consumers do not need to call this.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - origin
                - path
                - surface
              properties:
                origin:
                  type: string
                  description: The page origin (e.g. https://pinelake.org)
                path:
                  type: string
                search:
                  type: string
                  nullable: true
                  description: Query string portion of the URL
                surface:
                  type: string
                  enum:
                    - embed
                    - connect
                    - console
                embedToken:
                  type: string
                  nullable: true
                referrerUrl:
                  type: string
                  nullable: true
      responses:
        '200':
          description: Event logged
          content:
            application/json:
              schema:
                type: object
                properties:
                  pageViewId:
                    type: string
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Enter your API token from the Haystack dashboard

````