Auto-track
sessionvision automatically captures user interactions without any manual instrumentation. Once the SDK is installed, page views, clicks, and form submissions are tracked with rich metadata.
Page Views
The $pageview event fires on initial page load and on every page navigation. Any duplicate pageviews for the same URL are automatically deduplicated.
| Property | Description |
|---|---|
$current_url | Full URL of the page |
$referrer | Document referrer |
$title | Page title |
Clicks
The $click event fires when a user clicks on any interactive element. sessionvision uses a capturing event listener and walks up the DOM to find the nearest interactive parent (button, link, etc.).
| Property | Description |
|---|---|
$element_tag | HTML tag name (e.g. BUTTON, A) |
$element_text | Visible text content (PII auto-masked) |
$element_classes | CSS class list |
$element_id | Element ID attribute |
$element_selector | Generated CSS selector path |
$element_href | Link href attribute (for anchor elements) |
Form Submissions
The $form_submit event fires when a form is submitted. Only form metadata is captured — input values are never collected.
| Property | Description |
|---|---|
$form_id | Form ID attribute |
$form_action | Form action URL |
$form_method | HTTP method (GET/POST) |
$form_name | Form name attribute |
Automatic Properties
Every event — including custom events — is enriched with these properties automatically:
| Property | Description |
|---|---|
$browser | Browser name |
$browser_version | Browser version |
$os | Operating system |
$device_type | Device type (desktop, mobile, tablet) |
$screen_width | Screen width in pixels |
$screen_height | Screen height in pixels |
$viewport_width | Viewport width |
$viewport_height | Viewport height |
$timezone | User timezone |
$locale | Browser locale |
$connection_type | Network connection type |
$lib_version | SDK version |
$current_url | Current page URL |
$referrer | Page referrer |
Disabling Individual Features
Pass an autocapture config object to disable specific features while keeping others active:
sessionvision.init('YOUR_PROJECT_TOKEN', {
autocapture: {
pageview: true,
clicks: true,
formSubmit: false, // disable form submission tracking
},
});Set autocapture: false to disable all automatic tracking. You can still use capture() for custom events.