WebmeticDocs

Page views

GET
/session_user_data

Retrieves detailed user data for sessions associated with a specified domain within a given time range.

This endpoint provides granular information about user interactions during each session, including page views, scroll depth, and time spent on each page.

Parameters:

  • domain (str): The domain name for which you want to retrieve session user data.
  • from_date (str, optional): The starting date and time for the session data range. Accepts ISO 8601 format or relative dates like '-30 days'. Default is '-30 days'.
  • to_date (str, optional): The ending date and time for the session data range. Accepts ISO 8601 format or 'now' for the current date and time. Default is 'now'.
  • page (int, optional): The page number of results to retrieve. Default is 1.
  • page_size (int, optional): The number of entries to retrieve per page, up to 10000. Default is 10000.

Returns: A JSON object containing:

  1. Pagination information:
  • total: Total number of user data entries
  • page_total: Total number of pages
  • isFirst: Boolean indicating if it's the first page
  • current: Current page number
  • isLast: Boolean indicating if it's the last page
  • page_size: Number of entries per page
  1. Result: An array of user data objects, each containing:
  • session_id: Unique identifier for the session
  • timestamp: Date and time of the user interaction
  • document_location: URL of the page viewed
  • document_title: Title of the page viewed
  • scroll_depth: Percentage of the page scrolled
  • referrer: URL of the referring page
  • time_spent: Time spent on the page in seconds
  • user_events_count: Number of user events (e.g., clicks, form submissions) on the page

Note: This endpoint is rate-limited to 1 request per second.

Authentifizierung

APIKeyHeader
headerAuthorization<token>

Query-Parameter

domain*Domain
from_date?From Date

Starting DateTime format or relative dates like '-30 days', '-1 hour', '-5 minutes'. Examples: '2023-01-01', '-7 days', '-12 hours', '-5 minutes', 'now'

Standard"-30 days"
to_date?To Date

Ending DateTime format or 'now' for the current date/time. Examples: '2023-01-31', 'now'

Standard"now"
page?Page

Selected result page, starting at 1

Bereich1 <= value
Standard1
page_size?Page Size

Number of entries per page, from 1 up to a maximum of 10000

Bereich1 <= value <= 10000
Standard10000

Response-Body

One entry per page view; missing fields are absent

application/json
  1. response
pagination*array<>

Always one entry

result*array<>

One entry per page view

Beispielanfrage
curl -X GET 'https://hub.webmetic.de/session_user_data?domain=website.example'
Beispielantwort
{  "pagination": [    {      "total": 2,      "page_total": 1,      "isFirst": true,      "current": 1,      "isLast": true,      "page_size": 10000    }  ],  "result": [    {      "timestamp": "2026-10-20T08:20:26.384000",      "document_location": "https://nordhafen.example/dampfkessel",      "document_title": "Dampfkessel | Nordhafen",      "scroll_depth": 75,      "referrer": "https://www.google.com/",      "time_spent": 64,      "engagement_time": 41,      "user_events_count": 0,      "session_id": "01K8B3QW5N7M2XRT4HZJ6C9D0E"    },    {      "timestamp": "2026-10-20T08:21:30.384000",      "document_location": "https://nordhafen.example/kontakt",      "document_title": "Kontakt | Nordhafen",      "scroll_depth": 90,      "time_spent": 88,      "engagement_time": 70,      "user_events_count": 1,      "events": [        {          "type": "form_submit",          "target": "kontaktformular",          "detail": "https://nordhafen.example/kontakt",          "meta": {            "fieldCount": 6,            "fieldsInteracted": 5,            "timeSpent": 64          }        }      ],      "session_id": "01K8B3QW5N7M2XRT4HZJ6C9D0E"    }  ]}