Record Page View (v1)
Method + Path
POST /v1/public/tracking/page-view
Actual backend path: /v1/public/tracking/page-view
Description
Record a page view within a visit session. This endpoint tracks user navigation within a vCard or storefront.
Authentication
Not required - This is a public endpoint
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Content-Type | string | Yes | application/json |
Request Body
{
"visitSessionId": "session-123",
"pagePath": "/products",
"pageTitle": "Products",
"referer": "https://example.com/home",
"timeOnPage": 45
}
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
visitSessionId | string | Yes | Visit session identifier |
pagePath | string | Yes | Page path (1-500 characters) |
pageTitle | string | No | Page title (max 200 characters) |
referer | string | No | Referrer URL (max 1000 characters) |
timeOnPage | number | No | Time spent on page in seconds (minimum 0) |
Response (200)
{
"pageView": {
"id": "507f1f77bcf86cd799439011",
"visitSessionId": "session-123",
"pagePath": "/products",
"pageTitle": "Products",
"createdAt": "2024-01-15T10:00:00Z"
}
}
Common Errors
- 400 Bad Request: Invalid request body
- 404 Not Found: Visit session not found
- 422 Unprocessable Entity: Validation errors
- 500 Internal Server Error: Server error