Track Events

July 1, 2025
1 min read
eventstrackinganalyticscustom-events

UserPath automatically tracks user interactions and provides full control over custom event tracking.

Configuration

Configure auto-tracking using the browser pixel or SDK:

Auto-Tracking Configuration
Auto-Tracking Categories
Available configuration options for browser pixel and SDK implementations
OptionBrowser Pixel
errorsJavaScript errors and unhandled promises
clicksClicks on buttons,links,etc.
scrollingScroll depth milestones
formsForm interactions and submissions
videosVideo play/pause/complete events
pageVisibilityPage visibility and time tracking
pageInactivityUser activity/inactivity detection
performanceCore Web Vitals and performance metrics
allDisable all auto-tracking features

Automatic Event Tracking

UserPath captures comprehensive user interaction data when auto-tracking is enabled.

Core Events

EventTriggerKey Properties
clickInteractive elements clickedlabel, element, id
scroll50% page scroll depth reachedNone
page_visibilityTab/window visibility changesvisible, total_time, visible_time
page_exitUser leaves pagetotal_time, visible_time
user_inactive60+ seconds without interactionNone
user_activeUser becomes active after inactivityinactive_duration, url, title
errorJavaScript errors/unhandled promisesmessage, stack, source, filename

Form Events

EventDescriptionProperties
input_fillText inputs/textareas filledinput_type, label, form_name
input_selectDropdown selectionsinput_type, label, option_label, form_name
input_radioRadio button selectionsinput_type, label, form_name
input_checkboxCheckbox interactionsinput_type, label, checked, form_name
input_rangeRange slider adjustmentsinput_type, label, form_name
form_submitForm submissionsform_name, time_to_complete

Video Events

EventDescriptionKey Properties
video_playVideo playback startsduration, src, title, video_platform
video_pauseVideo playback pausescurrent_time, watch_time, duration
video_completeVideo playback completesduration, watch_time, video_platform

Additional Properties: video_id, aria_label, video_domain, nearby_text, plus any data-* attributes.

Performance Events

EventDescriptionKey Properties
page_loadPage load metricspage_load_time, dom_content_loaded_time, time_to_first_byte
core_web_vitalsLCP, FID, CLS measurementsmetric, value, rating

Custom Event Tracking

Custom events let you track business-specific actions beyond automatic tracking. Use them for feature usage, conversions, and business-critical metrics.

Browser-Side Custom Events

Browser Event Tracking

Server-Side Custom Events

Track business-critical events from your backend with session continuity:

Common Event Patterns

Event Pattern Examples

Server Events Best Practices

Bot Filtering

Filter bot traffic to avoid inflated metrics and costs. Check User-Agent headers:

Session Continuity

Store session ID and user agent from initial requests for use in webhooks and background jobs:

Error Handling

Always use try/catch and async IIFE for non-blocking tracking:

HTTP API

Direct HTTP requests for any language/platform:

Session ID Format

Session IDs must be valid UUID v4 format (e.g., d34d0c34-4d8b-4a88-a9a6-331cdb7b9d73). The SDK handles this automatically.

Best Practices

Ensure your events are properly structured:

  • Event names should be descriptive and consistent (use snake_case)
  • Property values should be meaningful
  • Keep property count reasonable (under 10 properties per event)
  • Use consistent data types for the same property across events
  • Ask our AI for help with event naming and property values