Feature · Conversion tracking

Track which short links generate leads

Clicks tell you who visited. Slugy tells you who converted — which link drove the signup, and which drove the sale.

What conversion tracking for short links actually means

A visitor clicks your short link, lands with a slugy_click_id, and later signs up or buys. Slugy joins that event back to the original click — so influencer B's 34 orders worth $1,740 beats influencer A's 12 orders worth $580 even when both got ~1,000 clicks. Who benefits most: indie SaaS founders and performance marketers comparing campaigns, ecommerce operators attributing influencer sales, and agencies reporting per-client results. Full method in how to track link conversions and the Shopify revenue guide.

  1. 1

    Share a tracked short link

    Create a branded short link for each campaign — influencer, ad, email, QR on packaging. Every click gets a unique slugy_click_id in the URL and a first-party cookie.

  2. 2

    Capture the click ID on your site

    Read slugy_click_id from the URL or cookie on landing and persist it (cookie or localStorage, 30–90 day TTL) through to signup or checkout. Without this ID, the conversion cannot be attributed.

  3. 3

    Send the lead or sale event

    POST lead.created (Pro) or sale.created with saleAmount/saleCurrency (Growth) to Slugy's API with the click ID. The event binds to the original link, workspace, and campaign.

  4. 4

    Report revenue per link

    Compare influencer A vs B on actual orders and dollars — clicks, conversion rate, and revenue per slug in one dashboard.

Minimal integration example

// 1. Capture on landing (cookie lives up to 90 days)
const clickId =
  new URLSearchParams(location.search).get("slugy_click_id") ??
  document.cookie.match(/slugy_click_id=([^;]+)/)?.[1];
if (clickId) localStorage.setItem("slugy_click_id", clickId);

// 2. Send at signup / checkout (Pro for leads, Growth for revenue)
await fetch("https://slugy.co/api/leads_track", {
  method: "POST",
  headers: {
    Authorization: "Bearer <workspace API key>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    clickId: localStorage.getItem("slugy_click_id"),
    eventName: "Sign up", // any name; repeats dedupe per customer
    customerExternalId: user.id, // your user/order id (required)
    customerEmail: user.email, // optional, used for attribution identity
    // saleAmount: 49, saleCurrency: "USD", // Growth only
  }),
});

Prefer no-code? Route sale.created through Zapier into your CRM, Sheets, or Slack.

Deduplication, attribution windows, and consent

The actual data model, so you can reason about edge cases instead of trusting a black box:

  • Deduplication is per customer and event: replays of the same (workspace, customer, eventName) are idempotent and never double-count. Distinct event names (e.g. “Sign up” vs “Purchase”) count separately. On the signup self-attribution path, workspace owners and members are skipped, so testing your own links does not pollute lead stats.
  • Attribution window is 90 days: the first-party cookie lives up to 90 days and the server-side click record expires after 90 days. Conversions arriving later return 404 for the click and are not attributed.
  • Last click wins: the browser holds the most recent click ID, so a later click overwrites an earlier one. Multi-touch journeys are not modeled.
  • Consent and blockers matter: the chain needs the first-party cookie or a persisted ID you store yourself. Rejected consent, private browsing, and cross-device jumps (phone click, laptop purchase) break attribution — there is no probabilistic stitching.
  • No flawless causal measurement is implied: attributed revenue means “this purchase followed that tracked click within the window”, not proof the click caused the purchase.

Honest limitations

  • Last-click attribution only — the most recent tracked click wins. Multi-touch journeys are not modeled.
  • Same-browser attribution — cross-device journeys (phone click, laptop purchase) are not linked without a shared identifier you provide.
  • Cookie/consent dependent — blocked third-party contexts and rejected consent banners break the chain. First-party persistence is required.
  • Unknown click IDs return 404 — log and continue; the underlying signup or order still exists in your system.
  • Lead events need Pro; revenue fields (saleAmount/saleCurrency) need Growth and return 403 otherwise.

Prove which links pay for themselves

Lead attribution on Pro ($8/mo), revenue attribution on Growth ($29/mo). Free to start — upgrade when the first conversion lands.