Skip to content

Sessions & Attribution

usertrax automatically captures and stores the following parameters from URL query strings:

  • gclid - Google Ads Click ID
  • gclsrc - Google Ads Click Source
  • dclid - Display & Video 360 Click ID
  • fbclid - Facebook Ads Click ID
  • fbc - Facebook Browser Cookie
  • fbp - Facebook Browser Parameter
  • msclkid - Microsoft Ads Click ID
  • ttclid - TikTok Ads Click ID
  • All parameters starting with utm_

Parameters are automatically:

  1. Captured from URL query strings
  2. Stored in localStorage with timestamps
  3. Included in all subsequent conversions
  4. Persisted across page views and sessions

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

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 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"}'
}
  • 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
window.usertraxConfig = {
crossDomainParamName: "uxs",
crossDomainDomains: [
"shop.example.com",
"blog.example.com",
"landing.example.com",
],
};
  1. Session ID in URLs: Automatically added to external links
  2. Session Recovery: Detected on target domain
  3. Attribution Continuation: All parameters preserved across domains

A/B test assignments are automatically included in events. Details and API (getVariant, getAssignments) are in A/B Testing.