---
title: "Track Page View"
method: POST
path: "/analytics/track/page-view"
tags: ["analytics"]
---

# Track Page View

`POST /analytics/track/page-view`

Track a page view event.
Creates or updates visitor session and records page view.

Sync (def, not async def) so FastAPI runs it in its threadpool instead of
on the event loop. The body is entirely sync DB work (no awaits) — keeping
it on the loop would block WebSockets / call traffic during the ~9
slow-request/6h spikes. Client only checks response.ok and doesn't
consume the body, so the threadpool wait is invisible to UX.

## Request body

- PageViewRequest
  - `session_id` string, required
  - `page_url` string, required
  - `page_title` string, nullable
  - `page_type` string, nullable
  - `language` string, nullable
  - `referrer` string, nullable
  - `time_on_previous_page` integer, nullable
  - `utm_source` string, nullable
  - `utm_medium` string, nullable
  - `utm_campaign` string, nullable
  - `utm_content` string, nullable
  - `utm_term` string, nullable
  - `gclid` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/fluentea/apis/aurqa-language-learning-platform-refactored.md) · [All operations](https://skmtc.dev/fluentea/apis/aurqa-language-learning-platform-refactored/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fluentea/aurqa-language-learning-platform-refactored/revisions/45cbba31aa7d/schema)
