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.

post/analytics/track/page-view

Request body

session_idstring required
page_urlstring required
page_titlestring nullable
page_typestring nullable
languagestring nullable
referrerstring nullable
time_on_previous_pageinteger nullable
utm_sourcestring nullable
utm_mediumstring nullable
utm_campaignstring nullable
utm_contentstring nullable
utm_termstring nullable
gclidstring nullable

Response

Successful Response

{"stackTrail":"paths:/analytics/track/page-view:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes

No recorded changes to this endpoint across all 2 revisions of this API.