Conversion Tracking

Track revenue events and connect them to ad platforms for Return on Ad Spend (ROAS) reporting. The tracker automatically captures ad click IDs from Google, Meta, X, LinkedIn, and TikTok.

How It Works

1

User clicks your ad

The tracker auto-captures the click ID from the URL (gclid, twclid, fbclid, li_fat_id, li_ed, ttclid, etc.)

2

User converts

Your code calls usersesh.conversion() with the event name and revenue

3

UserSesh syncs to ad platforms

Conversions are matched to ad clicks via the stored click IDs and sent back to the ad platforms for ROAS reporting

API

usersesh.conversion(options: {
  event: string;        // Conversion name (e.g. "purchase", "signup")
  revenue?: number;     // Revenue amount (default: 0)
  currency?: string;    // ISO currency code (default: "USD")
  metadata?: object;    // Optional extra data
})

Aliases: eventName works in place of event, value works in place of revenue, and properties works in place of metadata.

Examples

Free signup

// After successful signup
usersesh.conversion({ event: "signup", revenue: 0, currency: "USD" });

Trial start

usersesh.conversion({
  event: "trial_start",
  revenue: 0,
  metadata: { plan: "pro", trial_days: 14 }
});

Purchase / subscription

usersesh.conversion({
  event: "purchase",
  revenue: 49.99,
  currency: "USD",
  metadata: { plan: "pro", interval: "monthly" }
});

E-commerce order

usersesh.conversion({
  event: "purchase",
  revenue: 129.99,
  currency: "USD",
  metadata: {
    order_id: "ord_789",
    item_count: 3,
    payment_method: "stripe"
  }
});

Using alongside track()

You can fire both track() and conversion() for the same action:

// Track the event for analytics
usersesh.track("subscription_started", {
  plan: "pro",
  amount: 29,
  interval: "monthly"
});

// Also track as a conversion for ad ROAS
usersesh.conversion({
  event: "purchase",
  revenue: 29,
  currency: "USD",
  metadata: { plan: "pro" }
});

Supported Ad Platforms

The tracker auto-captures click IDs from these platforms when a user arrives via an ad:

PlatformClick ID ParamROAS Sync
Google AdsgclidDashboard → Ad Platforms
Meta (Facebook/Instagram)fbclidDashboard → Ad Platforms
X (Twitter) AdstwclidDashboard → Ad Platforms
LinkedIn Adsli_fat_idDashboard → Ad Platforms
LinkedIn (organic)li_edAuto-detected as Organic Social
TikTok AdsttclidDashboard → Ad Platforms
Microsoft AdsmsclkidDashboard → Ad Platforms

Connect your ad accounts in the dashboard under Settings → Ad Platforms to enable conversion syncing.

Next steps