Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Dub Tracking

strinkl uses Dub — a self-hosted instance at dub.strinkl.com — for branded link creation, click tracking, and conversion analytics. Every brand organization gets its own Dub workspace, provisioned automatically on signup.

How Attribution Works

Dub tracks a 3-stage conversion funnel: Click → Lead → Sale.

Click Tracking

When a visitor clicks a Dub short link, Dub captures the click server-side before redirecting to the destination URL. This cannot be blocked by ad blockers.
Data captured at click:
  • Unique click ID, timestamp, geographic location (country, city, continent)
  • Device type, browser, operating system
  • Referrer URL, UTM parameters, QR code flag
The click ID is appended to the destination URL as a dub_id query parameter. The Dub Analytics script detects this parameter and stores it as a first-party cookie with a default 90-day lifetime.

Lead Tracking

When a visitor takes a qualifying action (signup, booking, form submission), you track a lead event. This links the customer to the original click.

Sale Tracking

When the customer makes a purchase, you track a sale event. Dub automatically links this to the customer's previous lead event and attributes it to the original link click.

Attribution Models

ModelBehavior
Last-click (default)The dub_id cookie is overwritten with each new click. The most recent partner gets credit.
First-clickThe original dub_id cookie is preserved. The first partner retains credit.

API Key

Each organization has its own Dub API key, provisioned automatically on signup. You can find it in your Dashboard → Settings → API Keys tab.
The API key provides full access to your organization's Dub workspace. Keep it private and never expose it client-side.

Domains

Manage custom domains for your short links in Dashboard → Settings → Domains.
You can:
  • Add a domain — enter your domain, then configure DNS records (A record for apex, CNAME for www)
  • Verify a domain — check that DNS is properly configured
  • Set expired/404 URLs — configure where visitors land if a link is expired or not found
  • Delete a domain — remove a domain you no longer use
  1. Add your domain
    Click "Add Domain" and enter your domain name (e.g. links.yourbrand.com).
  2. Configure DNS
    Follow the DNS instructions shown. This typically involves adding an A record pointing to 76.76.21.21 or a CNAME record pointing to dub.strinkl.com.
  3. Verify
    Click "Check Status" to confirm DNS propagation. Once verified, the domain is ready for use.

Tracking Settings

Configure how Dub tracks visitors on your website in Dashboard → Settings → Tracking.

Step 1: Connect

  • Base Script — toggle the Dub Analytics script on your site to enable cookie-based tracking
  • Conversion Tracking — enable to start tracking leads and sales
  • Publishable Key — generated automatically; used by the client-side script
  • Allowed Hostnames — whitelist the domains where Dub should track conversions (e.g. yourbrand.com, app.yourbrand.com)
  • Site Visit Tracking — track page views on your site
  • Outbound Domain Tracking — track clicks that leave your domain
Add localhost to your allowed hostnames during development, and remove it before going live.

Step 2: Track Leads

Choose your authentication provider to see tailored setup instructions for tracking signups:
Better Auth
Integrate lead tracking with Better Auth to attribute new signups to the correct Dub link.
Clerk
Track lead events when users sign up via Clerk authentication.
Supabase
Track lead events from Supabase Auth signups.
Auth0
Configure lead tracking with Auth0.
Custom
Use the Dub SDK directly to track lead events from any auth provider.

Step 3: Track Sales

  • Stripe — install the Dub Stripe integration. When a customer checks out, pass their external ID in the session metadata. Dub automatically tracks the sale via webhook.
  • Custom — use the Dub SDK or API to send sale events manually.

Creating Links

Create short links for your creators from their profile page using the Link Builder:
  1. Destination URL — the page the link points to
  2. Domain — choose from your configured custom domains
  3. Key — a custom slug or randomly generated value
  4. Tags — organize links by campaign or category
  5. Conversion Tracking — enable to track clicks → leads → sales
  6. QR Code — auto-generated and ready to download
Links are automatically tagged with the creator's user ID, so each creator only sees their own links.

Analytics

View link performance in Dashboard → Analytics.
  • Stats summary — total clicks, leads, and sales
  • Timeseries chart — performance over time
  • Funnel chart — conversion rate from clicks → leads → sales
  • Top links — best-performing links by engagement
  • Referrers — where traffic is coming from
  • Location — geographic breakdown by country, city, and region
  • Devices — device type, browser, and OS breakdown

Events View

  • Raw event stream — every click, lead, and sale in a paginated table
  • Filter by event type — view only clicks, leads, or sales
  • Interval selector — 24h, 7d, 30d, 90d, or custom date range

Client-Side Tracking Script

The Dub Analytics script runs on every page of your site. It's automatically configured with your workspace's API host. To install the script on your own website:
<script src="https://www.dubcdn.com/analytics/script.js" defer ></script>
For a complete integration guide covering lead tracking, sale tracking, and cross-domain setup, see the Dub Integration Guide.

Resources