Every affiliate program dies twice. First when nobody joins. Second when someone joins, posts a link, sends traffic, and the sale lands with no affiliate attached. The second death is quieter, and it is almost always plumbing.
A referral link is four things in a row: a URL with a parameter, a cookie on your own domain, a checkout field carrying the value, and a webhook that writes it down. Four hops, each with its own way to fail. A redirect that drops the query string. A script that never loaded where the link pointed. A checkout created without metadata. None of these are marketing problems. They are engineering problems that marketers get blamed for, usually by someone who counted clicks.
TL;DR
- An affiliate link is a plain URL with a parameter. Everything after it is a cookie, a checkout field and a webhook, and any of the four can fail silently.
- Most "missing commission" reports are links that lost the parameter on a redirect, or a tracking script that never loaded on the domain the link pointed at.
- Short links help when the destination is long or the affiliate posts from a phone. They cost a redirect hop, a second domain to maintain, and a new place for tracking to break.
- Cloaking a link under your own domain is normal. Cloaking content so visitors and crawlers see different pages is a violation, and banning the word in your terms bans your own redirects.
- Test the path, not the link. A click that sets a cookie but never reaches checkout metadata produces no commission, and that is the bug you will hit first.
What an affiliate link actually is
Strip the branding and it is four steps in sequence.
- A URL with
?ref=CODEappended to the page you want traffic on. - A first party cookie, written by a small script on your site, holding that code.
- A checkout session that copies the cookie into the payment provider's metadata.
- A webhook that reads the metadata and writes a conversion against the affiliate.
Break one and the sale arrives orphaned. The affiliate opens a dashboard, sees clicks and no earnings, and concludes you are stealing from them. A reasonable inference when the only evidence is a click counter going up.
In Sled the chain is deliberately visible. The link is built from the website URL in settings plus ?ref= and a seven character code drawn from an alphabet without l, o, 0 or 1, so it survives being read aloud or retyped from a screenshot. The script at https://usesled.com/your-slug/t.js reads the parameter, writes ta_ref as a first party cookie with a 90 day default, and pings a click endpoint that dedupes by IP for 24 hours, so a refresh does not inflate the number. At checkout your own code passes ta_ref into metadata.referral, or customData.referral on Paddle. The webhook does the rest.
If you can recite that paragraph about your own setup, you can debug almost anything that happens later.
The five places links break
Redirects that drop the query string. An affiliate posts yoursite.com/?ref=abc1234, your edge redirects to www.yoursite.com, and the rule sends visitors to the homepage instead of the same path with the same query. The parameter evaporates, the visitor buys, nobody gets credit. The fix is one line: preserve path and query. Most hosts already do it, which is why nobody checks. If you moved domains, added www, migrated off http, or put Cloudflare in front of an old host, you have at least one of those hops in production.
The script on the wrong domain. It has to load where the link points. If the marketing site is yoursite.com but pricing and the app live on app.yoursite.com, and the script is only on the first, a large share of traffic is invisible. Same for a Webflow microsite, a docs subdomain, or the newsletter you moved to Substack two years ago. This is the most common setup error and it is invisible from the dashboard, because clicks that never happened and no traffic yet look identical.
Single page apps. A client side router can change the URL without a page load. A script that reads window.location.search once at load will miss ?ref= if the visitor lands on a cached shell and hydrates afterwards. Read the parameter on route change, or point affiliate links at a server rendered page first.
Case, encoding, invisible whitespace. Codes are lowercase, but a link pasted through a chat app arrives with a trailing period, a smart quote, or an encoded space. Uppercase REF is a different parameter. A code copied with a capital I where the alphabet has l is not the code. Trivia until one affiliate converts at a fraction of everyone else, because their post went out from a phone with autocorrect on.
The checkout that never receives the cookie. The last hop is the one people skip while testing. Link works, cookie sets, dashboard shows clicks, sale lands with nothing attached, because the session was created without metadata.referral. Every provider has its own way to pass it. When clicks convert but conversions never appear, check this first.

Short links: what they actually buy you
A short link is a redirect with a nicer face. The benefits are real, but narrower than the sales pitch.
| Link type | Looks like | Best for | Cost |
|---|---|---|---|
| Plain link | yoursite.com/?ref=abc1234 |
Posts, email, anywhere with room | Long, and visibly tracked |
| Short link | yoursite.co/x7k2 |
X posts, stories, print, spoken | A redirect hop and a domain to keep alive |
| Deep link | yoursite.com/pricing?ref=abc1234 |
High intent traffic, comparisons | Breaks when you rename a path |
| Branded redirect | yoursite.com/go/abc1234 |
Cleaning campaign URLs | Needs a route plus redirect rules |
| Click endpoint | usesled.com/slug/api/click?ref=abc1234 |
Debugging only | Records a click, sends nobody anywhere |
Name the costs out loud. A short domain is a second domain to renew, and if it lapses every post an affiliate ever published becomes a dead link in one afternoon. A redirect is one more place a parameter can be dropped. Short link services are third parties whose outage becomes your outage during a launch. And short links hide the destination, which makes some communities treat them as spam, so an affiliate posting in a forum is often better served by the plain URL.
The working rule: plain link by default, a short link for channels with character limits, and never a tool the affiliate has to log into just to retrieve their own link. That is the whole of the three link idea, and it fits in a table.
| Link | When to use it | Why it exists |
|---|---|---|
| Plain | Default, everywhere | Transparent, no third party, survives most editors |
| Short | Character limited posts, print, spoken | Fits where a long URL does not |
| Deep | Posts about one feature, plan or comparison | Sends high intent traffic to the right page |
Put a copy button next to the plain one, because that is the link that should get used. Everything else in your share kit exists to make publishing a two minute job.
Cloaking, and the two meanings that get confused
Two different practices share the name, and only one is a problem.
Link cloaking is cosmetic. You put a redirect under your own domain, yoursite.com/go/abc1234, so an affiliate's post does not look like a pile of tracking noise. The visitor lands on your site, the parameter passes through, the cookie sets. Normal, and many programs ship it because it also stops affiliates from stripping parameters while formatting a post.
Search cloaking is a policy violation. Serving one page to a crawler and another to a visitor, hiding text, or building doorway pages that redirect on user agent gets a site demoted or removed from results. It has nothing to do with affiliate links, but because the words match, programs sometimes ban "cloaking" in their terms and accidentally ban their own redirects.
The adjacent, legitimate issue is link marking. Search engines have asked publishers to mark paid and affiliate links for well over a decade, with rel="sponsored" or rel="nofollow", so a commission does not read as an editorial endorsement. That applies to the page the affiliate publishes, not to your redirect. Put it in your terms and in the copy you hand over.
Cookies, windows, and what browsers take away
Attribution is a cookie problem wearing a marketing hat. Sled's default window is 90 days, configurable per program, and the cookie is first party on your own domain, which is the most durable version available to a small company. It is still not permanent.
Three things shorten it in practice.
Safari limits cookies written by scripts far more aggressively than Chrome, and Firefox's tracking protection shortens anything it classifies as tracking. A 90 day window can behave like a much shorter one there. The sale does not vanish, it just has to happen sooner.
Consent banners apply to the referral cookie in most jurisdictions, and visitors who decline are, correctly, not attributed. Your attributed revenue will look lower than your actual revenue, and that is the system working.
Anyone who clears cookies between the click and the purchase is unattributable on the client side. That is why server side postbacks exist: the affiliate network's own click identifier survives where a cookie does not.
The longer version of the tradeoffs is in the cookie windows and attribution models guide, and the escape hatch is covered in server side postbacks.
Parameters: ref, UTMs, and not stepping on yourself
Affiliate links share URL space with everything else marketing does.
- Keep
refshort and lowercase. It is a lookup key, not a campaign name. - No query string in the website field in settings. If your site is stored as
yoursite.com?utm_source=x, every referral link inherits that query and the appended?ref=produces two question marks, which most parsers read as one broken parameter. - UTMs and
refcoexist.?ref=abc1234&utm_source=newsletterkeeps both, and a correctly written script reads only its own parameter. - Order matters to humans, not parsers. Put
reflast so it is what gets cut when a link is truncated, or first when the destination might append its own parameters. - Never edit a code once published. It is a primary key with a person attached. Retire it by pointing it at the same affiliate, never by reassigning it.
One detail: a paused affiliate stops accruing clicks in Sled, because the click endpoint checks status before writing. Old posts go quiet instead of generating misleading numbers. Tell the person you paused them, or the first thing they notice is a dashboard that stopped counting.
Deep links and the pages that stay put
Deep links convert better and break more often. Link only to paths you would not rename: /pricing, /features/<feature>, /compare/<competitor>, /docs. Not /pricing-v2, not a campaign page with a date in the slug, and never the checkout URL itself, because checkout sessions are per visitor and short lived. An affiliate linking straight to checkout either drops people into someone else's session or into a page that cannot read the cookie in time.
If you rename a path, keep a permanent redirect that preserves the query string, and leave it in place at least as long as your attribution window. A 90 day cookie window with a redirect deleted after 30 days is a program that quietly stops paying people.
Testing the path, not the link
Before recruiting anyone, walk the funnel with devtools open. The pass condition is a test conversion with the right affiliate attached, not an incrementing click counter.
| Check | How | Pass condition |
|---|---|---|
| Parameter survives | Open the link, read the address bar | ?ref= still present |
| Cookie set | Devtools, application, cookies | ta_ref equals the code |
| Redirect preserved | Test with and without www |
Same code after the hop |
| Click recorded | Affiliate dashboard | Count goes up once, not per refresh |
| Conversion attributed | Run a test purchase | Conversion row names the affiliate |
| Refund reverses | Refund the test order | Commission marked refunded, not deleted |
| Private window | Repeat the whole flow | Cookie is the mechanism, not the session |
That last row catches a surprising number of "it works for me" bugs. A program that attributes in the founder's browser and nowhere else is attributing by session, not by link.

When a sale lands unattributed
Work the chain backwards instead of guessing.
- Read the webhook log. An event with empty
metadata.referralmeans the problem is upstream of the provider. No event at all means the checkout or provider configuration, and no link test will help. - Check for the cookie. Private window, affiliate link, devtools. No
ta_refmeans the script is missing on that domain or a redirect ate the parameter. - Check the code character by character against the dashboard, then check the affiliate is still active.
- Check the timing. A purchase that predates the click is a refund replay, not a lost attribution, which this piece on refunds that beat sales covers.
- Only then reconcile provider revenue against the affiliate ledger. Small gaps are usually currency rounding, tax basis, or a trial that has not charged, all explained in why affiliate commissions don't match Stripe.
Write the finding down. The same three causes produce the same ticket every time, and a one page runbook beats re-deriving it at 11pm during a launch.
What your terms should say about links
No parameter stuffing. An affiliate may not append their code to links they did not create, and may not cookie stuff through an iframe or hidden pixel. It is easy to spot: one code on traffic that never clicked.
No brand bidding without permission. Paid search on your own name is the fastest way to make a program look successful while paying for customers who were already going to buy. The brand bidding guide lays out the options, from ban to allow at a lower rate.
No coupon injection. Extensions that overwrite cookies at checkout are the same behaviour with better engineering, and coupon leakage has the detection method.
Disclosure. Affiliates say they earn a commission somewhere a reader will see it, not buried in a footer.
None of this needs a lawyer at small scale. It needs you to be willing to close an account that is technically your best performer, which is the part that costs something.
FAQ
Why does my affiliate see clicks but no commissions?
Because clicks and conversions are recorded by different systems. The click is client side, fired by the tracking script when the parameter appears. The conversion is server side, written when a webhook carries metadata.referral. If checkout never copies the cookie into that field, clicks accumulate and conversions never arrive, and the link itself is fine.
Should I use a branded short domain for affiliate links? Only if you will maintain it indefinitely and preserve query strings on every redirect. It is nice for character limited posts and print, and a liability the day it lapses, because every historical post an affiliate wrote becomes a dead link. Keep the plain link as the default.
Does cloaking affiliate links hurt SEO? No. A redirect under your own domain that passes the parameter through is normal link management. What hurts a site is serving different content to crawlers than to people, or building doorway pages. The two practices share a name and nothing else.
How long should the attribution window be? Long enough to cover the real buying cycle for your price point. Sled defaults to 90 days and lets you change it per program. Browsers shorten that in practice on the strictest clients, so treat the window as a ceiling. If your sales cycle outlives any cookie, you need server side postbacks, not a bigger number in settings.
If this helped, the next thing worth reading is how attribution windows actually behave, and when you are ready to stop hand rolling the plumbing, start a program on Sled in about five minutes.