Sessions & Attribution
Automatic Parameter Capture
Section titled “Automatic Parameter Capture”usertrax automatically captures and stores the following parameters from URL query strings:
Google Ads
Section titled “Google Ads”gclid- Google Ads Click IDgclsrc- Google Ads Click Sourcedclid- Display & Video 360 Click ID
Facebook Ads
Section titled “Facebook Ads”fbclid- Facebook Ads Click IDfbc- Facebook Browser Cookiefbp- Facebook Browser Parameter
Microsoft Ads
Section titled “Microsoft Ads”msclkid- Microsoft Ads Click ID
TikTok Ads
Section titled “TikTok Ads”ttclid- TikTok Ads Click ID
UTM Parameters
Section titled “UTM Parameters”- All parameters starting with
utm_
Storage and Persistence
Section titled “Storage and Persistence”Parameters are automatically:
- Captured from URL query strings
- Stored in localStorage with timestamps
- Included in all subsequent conversions
- Persisted across page views and sessions
Session Tracking
Section titled “Session Tracking”Session Management
Section titled “Session Management”usertrax automatically manages sessions with the following features:
- Session ID Generation: Unique session identifier
- Session Duration: 30 minutes of inactivity
- Cross-Domain Support: Session continuation across domains
- Automatic Renewal: Sessions extend with user activity
Session Data
Section titled “Session Data”Each session includes:
{ session_id: "sess_1234567890_abc123", initial_referrer: "https://google.com", initial_landing_page: "https://example.com/landing", device_type: "desktop", browser: "Chrome", os: "Windows", // Plus all attribution parameters}Page View Tracking
Section titled “Page View Tracking”Automatic Page Views
Section titled “Automatic Page Views”Page views are automatically tracked with:
{ session_id: "sess_1234567890_abc123", url: "https://example.com/product/123", page_title: "iPhone 15 Pro - Example Store", referrer: "https://example.com/", viewport_width: 1920, viewport_height: 1080, screen_width: 1920, screen_height: 1080, load_time_ms: 1250, ab_test_variant: '{"button_test": "variant_red"}'}Page View Metrics
Section titled “Page View Metrics”- Load Time: Page load performance measurement
- Viewport Size: Browser window dimensions
- Screen Size: Device screen dimensions
- Scroll Depth: Maximum scroll percentage
- Click Count: Number of clicks on the page
- Time on Page: Duration spent on the page
Cross-Domain Tracking
Section titled “Cross-Domain Tracking”Configuration
Section titled “Configuration”window.usertraxConfig = { crossDomainParamName: "uxs", crossDomainDomains: [ "shop.example.com", "blog.example.com", "landing.example.com", ],};How It Works
Section titled “How It Works”- Session ID in URLs: Automatically added to external links
- Session Recovery: Detected on target domain
- Attribution Continuation: All parameters preserved across domains
A/B Testing
Section titled “A/B Testing”A/B test assignments are automatically included in events. Details and API (getVariant, getAssignments) are in A/B Testing.