Links and discount codes
An affiliate can share four kinds of link and one discount code:
- Referral link:
yourstore.com/?ref=sarah. Every affiliate gets one, on every plan. - Link builder: the same thing pointed at any page, with a tag for where they posted it:
yourstore.com/products/kodak?ref=sarah&ref_source=youtube. - Personal link ending:
yourstore.com/sarah, on your storefront, with no query string. - Short branded link:
app.sproutaffiliate.com/r/AB12CD, oraffiliates.yourstore.com/r/AB12CDonce you set up your own domain, for places with little room. - Discount code:
SARAH10, typed at checkout instead of clicked.
That split is the distinction that matters most: a link is credited by the click Sprout Affiliate records, a code by what the buyer types at checkout. The two easiest to mix up are the link builder (section 2 below) and the personal link ending (section 3 below), because both are Professional switches sitting one above the other in the same settings card.
Gives them:
yourstore.com/products/kodak-capture-one?ref=nicklaus&ref_source=youtube
The tag is what lets Analytics tell you which of their posts actually sells.
1. The referral link
Every affiliate gets one, on every plan, with no setting to switch on. It looks like https://yourstore.com/?ref=k7m2p9xd.
The ?ref= part is the affiliate's link name. Sprout Affiliate generates it as eight random lowercase letters and digits on purpose: a ?ref= value is public, so an affiliate's real name has no business being in it.
It is not fixed forever. When an affiliate gets a personal link ending (section 3), the app renames the ?ref= link name to match it, so /sarah and ?ref=sarah stay one name rather than two to keep track of. You can also rename it yourself from their profile.
Renaming never costs anyone a sale. The old value is kept as an alias and goes on crediting the same affiliate, so a link already sitting in a year-old video description keeps earning. That is deliberate: an affiliate's links live in places neither of you can edit.
If the affiliate's program applies the discount through the link instead of a code, the link is https://yourstore.com/discount/THEIRCODE?redirect=/?ref=k7m2p9xd. Shopify applies the code, then sends the shopper on to the tracked URL.
UTM tags, and whether you need them
A UTM tag is an extra piece of a web address that tells your analytics tool where a visit came from. They are a Google Analytics convention, not a Shopify or Sprout Affiliate one, and they look like this on the end of a link:
?ref=sarah&utm_source=affiliate&utm_medium=referral&utm_campaign=affiliate-program
You set one value for each, in the Analytics tags card at the bottom of Settings › Links, and every affiliate link carries that same set. That is the point of them: they label the channel, so all affiliate traffic collapses into one line in your reports that you can compare against email, paid, and organic. They are not a per-affiliate or per-post tag, and they are not meant to change from one affiliate to the next.
utm_source: the label for the channel as a whole.affiliateis the usual choice.utm_medium: what kind of traffic it is, for examplereferral.utm_campaign: a name for the program, for exampleaffiliate-program.
Each is cut to 60 characters, and anything other than letters, numbers, underscores, dots, hyphens, and spaces is stripped.
ref_source, the affiliate sets it themselves in the link builder (section 2), and it changes from one link to the next: youtube on the video, newsletter in the email. UTM tags never carry it. If what you want is "which of Sarah's posts sold this", that is ref_source, and it shows on the referral order and in Analytics.They change nothing about commission. Sprout Affiliate credits the sale from ?ref=, and ignores UTM tags entirely. They exist so affiliate traffic shows up as its own line in Google Analytics or your Shopify reports instead of being lumped in with everything else. If you do not use an analytics tool that reads them, leave all three blank.
Attribution runs through a Web Pixel, which is a small piece of tracking code Shopify runs on your storefront and checkout pages. Sprout Affiliate installs its own, so there is nothing for you to add. When a shopper lands on any page carrying ?ref=, the pixel saves that value in the shopper's own browser along with the time of the click.
At checkout it sends both to Sprout Affiliate. If you also switch on the app embed (the Sprout Affiliate tracking block, under App embeds in your theme editor), the same click is written to the cart as a Sprout Ref attribute, so the referral is recorded on the order itself as a second piece of evidence.
The click also has to be recent enough, or the referral is dropped. How recent is set by the Cookie duration (days) field on each program, 30 days by default: a click older than that when the order is placed earns nothing. Ticking Infinite cookie duration on a program means a click never runs out.
2. The link builder
Plan: Professional. Off by default. Turn it on at Settings > Links > "Let affiliates link to a specific page on your store".
The affiliate then sees a Link to a specific page card on their dashboard (and in the iPhone app) with two fields.
- Where it goes. They paste any page of your store (a product, a collection, a blog post). Leaving it blank means your home page. The app rebuilds the URL against your store's own domain, so a shopper is not sent through your
.myshopify.comaddress on the way, and adds their?ref=plus your UTMs. On a program that applies the discount through the link, the page link does too: it goes through Shopify's discount route and lands on the page, like the affiliate's referral link, so the code chosen for the affiliate's link is applied. A URL that does not point at your store, or a page you have refused under link exceptions, is refused when they try to save it. An exception covers the page in each of your store's languages and markets too, such as/fr/pages/wholesalefor/pages/wholesale. - Source (optional). A short channel tag such as
youtube,instagramornewsletter. Anything that is not a letter, number, underscore, or hyphen is stripped, and it is cut to 40 characters. It goes on the link asref_source=youtube.
The pixel stores the source tag alongside the referral, so a shopper who clicks a tagged link and buys three days later is still tagged to that channel. Each affiliate can keep up to 100 saved links, so they can come back for the exact URL they put in a video description months ago.
The tag then appears in two places. On Referrals > the order, the Source card shows "Channel tag: youtube". In the affiliate's own referrals table, a Source column appears, but only once at least one of their orders actually carries a tag, so an affiliate who never tags anything never sees an empty column.
Limitations worth knowing. Source tags are recorded per order. There is no report that totals sales by tag, so comparing channels means reading the orders. Tags also only exist on orders the pixel reported: an order attributed by discount code alone has no tag.
3. Personal link endings
Plan: Professional. Off by default. Turn it on at Settings > Links > "Allow affiliates to create their own custom links".
A personal link ending gives an affiliate https://yourstore.com/nicklaus. Behind it is one Shopify URL redirect (the same kind you can make by hand under Online Store › Navigation › URL Redirects), created by the app and pointing at exactly the same ?ref= destination the plain link uses.
Attribution is identical. Only the URL is prettier. It works this way because Shopify does not let an app answer a web address at the top level of your domain, and a URL redirect is the one mechanism that can.
The request and approve flow. The affiliate types the ending in their portal, under "Add custom link". By default nothing goes live: the request lands on their profile at Affiliates > their name, in a banner with Approve and Decline. Approving publishes it. You can also just type an ending on their profile yourself and press Save.
Auto-approve. The sub-setting "Approve custom links automatically" makes their button say Save instead of Request, and the link publishes immediately. A program can override the shop setting, and a single affiliate can be overridden again on their profile ("Goes live instantly" or "Always review it first"), where a green pill names what their program says and opens it. Every validation still applies either way.
An ending is refused if it is shorter than two characters, is all digits, is one of the 23 reserved storefront words (products, collections, pages, blogs, cart, checkout, account, apps, a, admin, search, discount, orders, policies, tools, services, password, challenge, customer_authentication, wpm, cdn, sitemap.xml, robots.txt), is already held by another affiliate's live link or pending request, or already exists as a redirect in your store that Sprout Affiliate did not create.
What they type is lowercased, spaces become hyphens, anything other than letters, numbers, dots, underscores, and hyphens is dropped, and the result is cut to 60 characters. Affiliates get a deliberately vague "Pick another" so they cannot map out who holds what; you get the specific reason. When an ending publishes immediately, the affiliate waits ten seconds before saving again, whether or not Shopify accepted the change, because those writes come out of the same allowance of Shopify admin requests that order tracking and discount creation use. A typo, or an ending someone else already holds, is refused before that clock starts, so it costs nothing.
The checkbox "Let this affiliate request their own custom link" on a profile is a hard off for that person, and turning it off withdraws any request they have pending.
Why an old ending keeps working. When an affiliate changes their ending, the old redirect is not retargeted or deleted. It stays live, still pointing at their ?ref= destination, so the link already sitting in a video description or a bio keeps working and keeps earning them commission. Up to ten retired endings are kept per affiliate; past that the oldest is deleted, on the assumption that a link shared years ago is the least likely to still be selling. Removing an affiliate's custom link removes the live ending and every retired one.
Publishing an ending also renames the affiliate's ?ref= link name to match, where that name is free, so there is only one name to maintain. Their old link name is kept as an alias, which means it still credits them, so any link already in the wild carrying it goes on earning. If someone else later takes a name that is still an alias, the live affiliate wins, so old clicks can never be handed to a new person by accident.
Limitations. If you delete the redirect by hand in Shopify, re-saving the same ending repairs it. If you downgrade below Professional, existing endings keep redirecting, but affiliate saves quietly fall back to filing a request, and approving one is refused until you upgrade again.
4. Short branded links
Plan: Professional. Off by default. There is no switch for this in the web admin yet: the setting is carried by the phone app's settings API, so a store that has it on keeps it.
The affiliate's dashboard then shows https://app.sproutaffiliate.com/r/ab3kx9m as their link to copy. Each affiliate gets one seven-character code, created the first time they need it, drawn from a 32-character set that leaves out 0, o, 1 and l so it can be read aloud without confusion.
Opening it is a redirect to your store's home page with their ?ref= and your UTM tags attached. That has three consequences:
- A short link always lands on the home page. It cannot point at a product page, and it does not carry a source tag.
- It is on the Sprout Affiliate domain unless you set up a domain of your own (section 6), which moves it to yours.
- It redirects via your
.myshopify.comaddress, which Shopify forwards to your primary domain.
If the short link cannot be created, the affiliate is shown their full link instead. After a downgrade the dashboard goes back to the full link, but short links already shared keep redirecting.
5. Discount codes
Settings > Coupons has an Enable switch at the right of its heading. Turn it off and the rest of that tab goes with it: no coupon is created when an affiliate is approved, no affiliate can ask for one, and assigning one is refused, so a program that works by link alone is one switch rather than a tab of settings that do not apply. Turning it off asks you first, then deactivates every affiliate coupon code created in Sprout Affiliate, so they stop working at checkout. Turning it back on reactivates them, except on a program whose own coupon codes are off (unless that affiliate has coupons of their own). The list of the codes this app created stays on the tab. It is on unless you turn it off.
Codes are available on every plan. On a program, the Enable switch beside the Coupon codes heading turns them on, and How customers get the discount chooses between "Discount code" and "Auto-applied by the affiliate's link". With it off the program is link-only and hands out no coupons at all, and the codes its affiliates already had are deactivated in Shopify when you save, after the editor asks "Turn off coupon codes?" (see Coupon codes in the Programs guide). In link mode the affiliate still has a code, it is just applied by the URL rather than typed by the shopper.
Where an affiliate's first code comes from. The signup form never asks an applicant for a code. On Free and Growth, an affiliate you approve starts with none: they set one in their portal or the iPhone app, or you assign one on their profile with Assign coupon, and the Shopify discount is created at that moment. On Professional and Enterprise, approving an application yourself (one at a time or in bulk) creates a code for them, as long as their program offers a discount above 0%. A program that approves signups automatically does not create one.
What that code looks like, and whether it is made at all. Both are set store-wide under Settings > Coupons > Automatic coupon for new affiliates: the Enable switch at the right of that heading, which saves the moment you flip it, and, while it is on, a Default coupon code shape built from tokens like (first name) and (last name). The shape starts as the first name, (first name). An empty box cannot be saved. Jane Smith gets JANE, then JANE2 if that is taken. A shape has to include (first name) or (last name), or every affiliate would get the same code, so one without either is not saved. A program can set its own shape, which wins over the store's, and can turn minting off for itself, so a coupon is created only when the store and the program both say yes.
Seeing what a code really does. Settings > Coupons shows the codes this app created, newest first. Click its heading, or View all, for the full list on a page of its own: every code, with what Shopify says about it right now (Active, Deactivated, Scheduled, or Not in Shopify) and how many times it has been used. A code moved over from another app is looked up in Shopify by the code itself, so it shows its real state too. Not in Shopify means Shopify has no discount with that code, usually because it was deleted in Shopify. Filter it by status, program, kind of discount, who created it (you, the affiliate, auto-approval, or an import) and when, search it by code or affiliate, and sort it by newest, oldest, code, or most used. Each code opens that discount in your own Shopify admin, where its amount, its products, its limits, and its usage are, and each affiliate opens their page. A code created before the app recorded which discount it made, or adopted from a discount you already had, opens your discounts list filtered to that code instead.
Code rules. Uppercase letters, numbers, and hyphens, 3 to 20 characters. Other characters are stripped as you type it. A code must be unique across every primary code and extra coupon in your store.
If the code already exists in your Shopify discounts and Sprout Affiliate did not create it, the request is refused, and the message names the code and tells you to delete that discount under Discounts or pick another. That is deliberate: adopting your own public sale code would let an affiliate claim commission on it.
Review first. A program can turn on "Approve coupon codes", which appears once "Coupon code requests" is on. The affiliate's request lands on their profile with Approve and Decline, and their current code keeps working until you decide.
Extra coupons. On a profile, "Let this affiliate create their own coupons" plus a Coupon limit sets how many they may create (1 by default). You can also assign coupons to them yourself. If their program doesn't let affiliates ask for coupons, the profile says so under the switch: turning it on lets that one affiliate create them anyway.
Coupons for one affiliate when their program has none. When an affiliate's program has its coupon codes off, the Coupons card on their profile is a single switch in its heading, with the line "This setting will override the program default" and the green "Program default: off" pill under it. Turn it on and that one affiliate can have coupons anyway. Set what their coupons take off (a percentage, an amount, or free shipping) and save it, then assign codes to them or let them create their own, as on any other program. Their codes use that discount, since the program has none of its own, and switching the program's coupon codes off or on later leaves them alone. New codes get the discount you save. Codes already in Shopify keep the discount they were made with. Turning the switch off asks first, then deactivates each of their codes in Shopify and removes it from them, exactly like pressing Remove on each one, and orders already placed with them stay credited. An affiliate who still holds codes on such a program, for example one moved there from another program, shows the switch on, so no code keeps working behind a switch that says off.
Removing a coupon behaves differently depending on who does it. When you remove one from a profile, the app deactivates its Shopify discount too, so it stops giving money away with nobody credited, and it tells you if the deactivation failed so you can do it under Discounts. When the affiliate removes one of their own from the portal, the Shopify discount stays live in your store until you delete it there. In both cases the orders already placed with it are pinned, so those stay credited.
Product scope. On a profile, Coupon products limits that one affiliate's coupons to chosen products or collections; leaving it empty follows the program's scope, and the green pill beside it names that scope and opens it. Changing the scope only affects codes created from then on. Existing Shopify discounts keep the scope they were made with, like any other discount setting.
6. URL Branding
Plan: Professional. Off by default. Set it up at Settings > Links > URL Branding.
Three pages are shown to your affiliates rather than to you: the signup form they apply through, the login page, and the portal where they get their link and watch what they have earned. All three are served by Sprout Affiliate, so by default they sit on app.sproutaffiliate.com. Point a subdomain you own at us and they move to it.
This is the domain the pages and the links sit on. Sending your affiliates' email from your own domain is a separate setting on the Professional plan, covered under sending from your own address.
| Page | Default | On your domain |
|---|---|---|
| Signup | app.sproutaffiliate.com/join/yourstore | affiliates.yourstore.com |
| Login | app.sproutaffiliate.com/affiliate/login | affiliates.yourstore.com/affiliate/login |
| Short link | app.sproutaffiliate.com/r/ab3kx9m | affiliates.yourstore.com/r/ab3kx9m |
The bare hostname works as the signup link, so what you hand out is affiliates.yourstore.com and nothing more.
Setting it up
- Pick a subdomain of a domain you already own.
affiliates.yourstore.comandpartners.yourstore.comare the usual choices. - Type it into Settings > Links > URL Branding and press Add domain.
- The page then shows a DNS record. Add it wherever your domain's DNS lives, which is your registrar unless you moved it somewhere else.
- Press Check again. If DNS has not spread yet, wait and press it again; you do not have to stay on the page, because Sprout Affiliate re-checks every hour on its own and switches the domain on the moment it is ready.
Some DNS panels call Name the "host" and Value the "target", "points to" or "data". A few want the full affiliates.yourstore.com in Name rather than just affiliates.
Why it has to be a subdomain
Your main domain already points at Shopify, because that is what serves your storefront. A CNAME cannot sit alongside the records a domain's root needs, so pointing yourstore.com itself here would take your shop offline. Sprout Affiliate refuses a bare domain for that reason.
What happens between adding it and it going live
Nothing changes for anyone. The domain reads Not ready, and every link keeps using app.sproutaffiliate.com, so a half-finished setup cannot break a signup page or strand an affiliate. Two things have to finish first:
- DNS. Your record has to spread far enough for our servers to see it. Usually a few minutes; up to an hour if your DNS has a long TTL.
- A security certificate. Requested automatically once DNS resolves, and issued in about a minute. Without one, browsers would warn every affiliate who followed the link instead of showing them a login form.
What moves to your domain
- The signup page, the login page, and the affiliate portal.
- Short branded links, so
/r/ab3kx9mfinally carries your name rather than ours. - The signup link shown on your Programs page, and the one in a recruiting invite.
- The confirm-your-email link an applicant clicks.
- The "open your portal" links inside commission emails and portal messages.
- Log in as from an affiliate's page, since that opens their portal.
- An affiliate who switches to your store from another store's portal, from the Store menu on the dashboard or on any portal page, lands on your domain, signed in.
Referral links themselves are unaffected. Those already point at your storefront, which was never on our domain: yourstore.com/?ref=sarah looks the same either way.
The marketplace stays on app.sproutaffiliate.com. It is one directory shared by every store in it, so it cannot be served under any single one.
Changing or removing it
Remove puts every link back on app.sproutaffiliate.com straight away. Links you already gave out keep working either way, so an affiliate holding an old one is never stranded, and you can take the DNS record down afterwards. Adding a different domain replaces the first and releases its certificate.
Removing is never blocked by your plan. If you drop below Professional the domain keeps serving, but you will not be able to change it until you are back on a plan that includes it.
Products for affiliates
Plan: Growth. Off by default. Turn it on at Marketing assets > Products for affiliates > "Share your products with affiliates", then press Save.
The affiliate then sees a Products card on the Assets page of their portal, under your banners and copy. Each product shows its image, title, and price, with Out of stock beside it when Shopify counts none left. Copy link copies the product's address with the affiliate's own tracking on it. The list starts at ten rows, and a search box above it finds products by title. Download CSV feed gives the same list as a file, for an affiliate who runs a comparison or deal site. Its columns are title, url (with the affiliate's tracking), image_url, price (such as 19.99 USD), and availability (in stock or out of stock).
Each link is built the way the link builder builds a link to a page, so a product link and a page link to the same product are the same link. Banner and plain links in Marketing assets that point at a page of your store are built the same way.
In detail:
- On a program that applies the discount through the link, the link goes through Shopify's discount route and lands on the product, so the affiliate's code is applied:
yourstore.com/discount/SARAH10?redirect=/products/kodak?ref=sarah. The code is the one chosen for the affiliate's link. - An affiliate with a personal link ending gets the
?ref=link to the product. A personal link ending always lands on your home page, so it cannot carry a product; the?ref=link credits the same affiliate the same way. - Your analytics tags (Settings > Links) are on every link, as on the referral link.
- A product under one of your link exceptions (Settings > Links) is left out.
Which products. Every active product your Online Store sells, or only the products in the collections you pick with Choose collections. Drafts, archived products, and products not on the Online Store are never listed. Up to 5,000 products are shared; a larger catalog is cut there, and the card says so.
How fresh it is. Sprout Affiliate keeps a copy of the list and reads it from Shopify when you press Save, when you press Refresh, and in the background when the copy is more than 6 hours old. An affiliate opening the portal never waits on Shopify. The card shows how many products were read and when. If a read fails, the card shows why, and the list affiliates see stays as it was. After you change the collections, affiliates see the new list once it has been read, never products from the collections you took off.
Below Growth, or with the switch off, the Products card and the CSV feed are gone from the portal. The affiliate phone apps do not show products; the portal does.
How a code differs from a link for attribution
| Discount code | Referral link | |
|---|---|---|
| Evidence | The code on the order | The click, reported by the pixel or carried on the cart |
| Time window | None. Whenever it is used, it credits | The program's cookie duration (30 days by default) |
| Survives the shopper clearing their browser storage | Yes | No |
| Carries a source tag | No | Yes, if the link was tagged |
When an order has both, the code wins. The exception is anti-leak discount protection (every plan, off by default, under Settings > Fraud detection). With it on, a code alone earns nothing: if the click names a different affiliate, the click is trusted, and if there is no click at all, nobody is paid. That is what stops a code posted to a coupon site from paying an affiliate who did not send the customer.
Changing a code never breaks history, but it does leave the old code live in your Shopify discounts. Orders already placed with the old code stay credited to the affiliate. The old code goes on working at checkout, and because it no longer belongs to anyone in Sprout Affiliate, orders that use it from then on give the customer the discount and credit nobody. Delete it under Discounts once you no longer want it redeemable.