A referral code, often shared as a link, is a unique identifier that tells a brand who sent a new customer its way. The person who shared it gets the credit, and the newcomer often gets a welcome reward. You’ve probably seen one at checkout or in a small box marked “referral code (optional)” on a sign-up form. Below, we cover what it means, how it differs from affiliate and discount codes, and how to build a program around one.
Key Takeaways
- A referral code links a new customer to the person who recommended your brand. It’s how you’ll give a reward to both people and track the sales that each recommendation brings in.
- Referral codes go to existing customers, while affiliate codes go to outside partners. A discount code is open to anyone who finds it.
- In Nielsen’s 2021 survey of more than 40,000 consumers, 88% of global respondents said they trust recommendations from people they know more than any other channel.
- Programs succeed with a simple two-sided offer, easy sharing and steady promotion, not with a complicated reward ladder.
- Many newer programs use unique links instead of typed codes, so customers can share and redeem them without copying, pasting or logging in.
What Is a Referral Code?
Most of us meet referral codes as shoppers long before we consider running a program for our own store, so we’ll start there.
The meaning of a referral code
A referral code is a unique identifier that a store gives an existing customer, usually called an “advocate.” The advocate passes it to a friend. When the friend uses it, the store’s system records who made the introduction and pays the agreed rewards to the right people.
Word of mouth is about as old as selling gets. Somebody tells a friend “you should try this,” and the friend goes and tries it. A referral code doesn’t change any of that. It simply records each recommendation in the background, so the store can later see which ones led to sales.
Referral code vs. referral link
A friend has to type in a code like SARAH20, but a referral link puts that same information into the URL and applies it in one click. Both ways work, but links are easier for the friend because they can’t be mistyped and they apply on their own, so there’s nothing to forget between the cart and the payment screen.
Plenty of brands offer both. Links tend to suit texts, emails and social posts, where the friend only has to tap, while a short code works better when someone recommends you out loud or at a point of sale because it’s easy to remember.
What a referral code looks like in real life
Most are a handful of letters and numbers. Some brands let advocates choose their own. You’ll probably see one of these:
- Name-based: A typical example is SARAH20. Because the code uses the advocate’s name, a friend can hear it once and still remember it the next day.
- Random strings: Because it doesn’t mean anything, K7P2XQ is hard to guess. A system can generate codes like it in bulk.
- Link-based: Because yourstore.com/refer/sarah holds the code in the URL, the friend just clicks and never has to type anything.
What “referral code (optional)” means on a sign-up form
The box is there for people who were sent by someone else. Usually that’s a friend, but existing members and agents hand out codes too. If nobody sent you, leave it empty. If someone did, entering their code typically credits them. You might pick up a welcome reward of your own.
Every company does this a little differently. For some, you have to enter the code while signing up, while others let you use it right up to your first purchase. If the terms aren’t clear, it’s a good idea to ask support before you sign up without the code, since adding it too late could cost you the credit.
How to find your own referral code
You’ll want to start with your profile or rewards page since that’s where most brands put it. If you can’t find it there, there may be a “refer a friend” tab, or the code may be in the confirmation email from your first order. Support can point you to it if you still come up empty.
If a code from a friend doesn’t work at checkout, it’s usually down to something simple: the code may have expired, it may be valid only for new accounts, or there may be a stray space on the end. Clicking their link instead or asking them to send a fresh code sorts out most cases.
How Referral Codes Work Behind the Scenes
A customer can pass a code to a friend in seconds, while the store’s system handles several moving parts in the background. Rules that are fair, clear, and hard to abuse are far easier to set once you know how these parts connect.
The five steps of a referral
- Creation: Once Sarah signs up, the platform gives her a code of her own, along with a matching link.
- Sharing: She usually sends it to a friend by text or email, though she could just as easily post it online or mention it over dinner.
- Recognition: Your store gives Sarah credit for the introduction. This happens when the friend clicks the link or types in the code.
- Qualification: The friend then does whatever you decided counts, such as a first purchase above a minimum spend.
- Reward: Sarah and her friend both get what you promised, straight away in some programs and after a set period in others.
Rules worth deciding up front
Before launch, write down these small details because they change how a program feels to people:
- Who counts as “new”: This is usually a friend who’s never ordered from you. That keeps the rewards focused on real acquisition.
- Minimum spend: This sets a floor on that first order. The limit also helps protect your margin.
- Single-use or multi-use: Limiting each friend to one use works well. An advocate can still refer as many people as they’d like.
- Expiry: A 30 or 60 day window nudges people to act. It doesn’t leave anyone feeling tricked.
- Stacking: You’ll need to figure out whether a referral reward can work alongside your other promotions. Write that answer clearly on the offer page.
- Case sensitivity: Both SARAH20 and sarah20 should work. If a code fails, it’s a sale you’ve lost.
A quick example of the math
Imagine an average order of $60. A successful referral costs you $20 in total, split between a $10 credit for the advocate and a $10 discount for the friend. After the friend’s discount, you’ll collect $50 on that first order and gain a new customer.
Now put that $20 next to what you currently pay to win a new customer through ads. If referrals come out cheaper and the customer comes back, the program has earned its place. The figures here are made up for the example, so run the same math with yours.
Referral Codes vs. Affiliate Codes vs. Discount Codes
A referral code, an affiliate code, and a discount code can all sit in the same checkout box, but they’re doing different jobs. Confusing them is how brands end up building the wrong program.
- Referral codes: Your existing customers give these to people they know, so there’s already trust when a new shopper shows up. The advocate and the friend both get a reward in most programs.
- Affiliate codes: These belong to external partners, such as creators, bloggers and occasionally other businesses. They promote you to their own audience for a commission, which makes it more of a business partnership than a personal recommendation.
- Discount codes: Anybody can use one. “HOLIDAY20” doesn’t belong to any one person, which is why codes like it work for seasonal sales or first-order deals.
All three can drive sales. Referral codes stand apart because they lean on trust two people already share.
Where Else You Will See Referral Codes
You’ll notice referral codes far beyond retail, in banking and investing apps, ride and delivery services, subscription boxes and software tools. All of them use these codes to expand through the people who already rely on their products.
Sales teams and agents use them too so they can show who brought in an account, which is why a form may ask you for an “agent referral code.” It’s a different setting, but the code still tells the company who made the introduction.
Why Referral Marketing Matters for E-commerce
A referral program isn’t just an add-on. If you run it well, it gives you a steady source of new customers who come already leaning your way.
Trust does the heavy lifting
Shoppers see many ads, and they know when they are being sold to. A recommendation from a friend is not the same. Nielsen’s Trust in Advertising survey, run in September 2021, backs this up, as 88% of global respondents said they trust recommendations from people they know above any other channel.
The newcomer already has some confidence in your product before seeing a single ad from you, since that endorsement acts as social proof.
Referred customers tend to be worth more
One widely cited, if older, study in the Journal of Marketing followed roughly 10,000 customers of a German bank for almost three years. Referred customers were worth at least 16% more than comparable customers who weren’t referred, and their retention advantage continued over time.
Of course, a single bank isn’t every store, so it’s best to treat it as a signal rather than a promise. Even so, many e-commerce teams see something similar. Shoppers who arrive through a friend often stay longer.
Lower acquisition costs, if you manage rewards well
Paid ads bill you whether or not anyone buys. A referral program works differently, since you only pay out once a referral has actually worked, and that money goes to people who already like your brand. It can even make them like you a little more.
A growth loop that feeds itself
Each good referral can kick off the next one:
- A satisfied customer refers a friend.
- That friend becomes a new, satisfied customer.
- They now have a reason to refer someone as well.
This loop builds a community of brand advocates over time. They care about your growth because they’re sharing in it.
How to Build a Referral Program, Step by Step
A referral program should start from what the business needs it to do. Then look at what gets your customers talking and how you want the experience to feel. Your answers will shape the reward, the platform and the sharing flow.
Step 1: Set clear goals and KPIs
Write down your targets before design starts. Make each one specific enough to measure. For example, you might aim to:
- Next quarter, increase new customers from referrals by 15%.
- Earn a 5:1 return on what you spend on referral rewards.
- Within six months, bring total customer acquisition cost down by 10%.
Your own targets should come from where you are today. Once they’re set, a handful of KPIs will show whether you’re getting there:
- Participation rate: This shows how many of your customers have joined.
- Share rate: It’s how often an advocate shares on average.
- Click-through rate: It’s how many of the links that go out actually get clicked.
- Conversion rate: This tells you how many of those clicks turn into orders.
- Referral revenue: This is the total that referred customers spend with you.
Step 2: Design an incentive people want
Ask yourself what would make you share a brand with a friend. The best incentive usually lets people feel they’re doing their friend a favor, and the store still benefits.
One-sided vs. two-sided rewards
- One-sided: only Sarah or only her friend gets rewarded. It’s simple to run, but the invitation feels a bit lopsided when one of them walks away with nothing.
- Two-sided: Sarah and her friend both get something, so she’s handing over a discount instead of asking a favor. In most cases, it’s the stronger choice.
Reward types to consider
- Store credit or cash: an offer like “$20 for you, $20 for your friend” needs no explaining, which is a big part of its appeal.
- Percentage discounts: when the friend has a “25% off” coupon, they may decide to fill a bigger first basket.
- Fixed-amount discounts: An offer like “Save $15 on your first order” makes good sense if your average order value stays fairly steady. It’s a sensible approach.
- Free products: Giving away a popular item tends to feel generous to the friend. The item also costs you less than its retail price.
- Loyalty points: Points earned through referrals fuel your retention strategy directly. These points also encourage advocates to come back.
Begin with an amount your margins can comfortably carry. Then test a second offer against it, since what feels generous in one product category can land very differently in another.
Program structures you can choose from
Once the reward is settled, think about the shape the program will take over time.
- Simple give-and-get: One reward goes to the advocate and one goes to the friend. Since there’s little to explain, it’s a good first version.
- Tiered rewards: your most enthusiastic fans have more reason to stay engaged when the bonus climbs as they refer more people, for example after the third referral.
- Points-based: When referrals add to an advocate’s loyalty points, the points can be spent on whatever rewards you offer.
- Milestone bonuses: An advocate picks up one extra reward for reaching five successful referrals in a year, or a similar goal.
Pick the simplest setup to suit what you sell. Tiers can come later, after you’ve seen real behavior.
Words that get referral invitations opened
Do not treat the message as an afterthought, because it carries your link and matters as much as the reward does. It should be short and personal, with the friend’s benefit placed up front. Subject lines like “Give $20, get $20” tell people exactly what to expect. A note that sounds like a friend wrote it usually does better than anything that reads like an announcement.
It also helps to give advocates a ready-made message they can edit. Many people find sharing easier once a first draft is ready. Adding their own words makes the message sound like a genuine recommendation.
Step 3: Make sharing effortless
Even a strong reward fails if the program is hard to use, which is why it pays to try the whole thing yourself, once from the advocate’s side and once from the friend’s.
For the advocate:
- Easy to find: the code or link sits on the account page or on a dedicated landing page.
- Easy to share: a single tap opens email or text. Social sharing and a “copy link” button are built in too.
- Easy to track: a simple dashboard shows where every referral stands. It follows each one from sent to clicked to converted.
For the referred friend:
- Clear offer: The link opens a page where the friend can spot the offer right away.
- Automatic reward: because the reward applies at checkout, there’s nothing extra to type.
- Short path to purchase: Every extra step between the click and the purchase costs you conversions. Keep them to a minimum.
Step 4: Choose the right technology
A spreadsheet’s fine with a handful of orders. Past that, it gets slow and messy, and you soon stop trusting what it shows you. A dedicated platform handles the tracking and rewards.
When you compare options, check for these:
- Unique codes or links that are created and managed for you.
- Tracking that follows each share and click all the way to a conversion.
- Reward rules you can change yourself, without having to call a developer.
- A clean connection to your e-commerce platform.
- Reporting that lines up with the KPIs above.
- Fraud checks, so your rewards budget is protected.
Using Yotpo Loyalty & Referrals
If you want a full-featured referral program, Yotpo Loyalty & Referrals covers everything above in one place. Rather than typed codes, it gives each customer a unique, ready-to-share referral link, with no login needed.
A few features stand out:
- More places to ask for referrals: You can place referral invitations in on-site widgets, email, SMS and the post-checkout experience. That way, advocates share while they’re still excited.
- Rewards tied to loyalty: When referrals earn loyalty points, acquisition and retention start working together. This encourages people to refer again.
- Built-in fraud prevention: The platform checks referrals to help keep them authentic. This means rewards go to real advocates.
- No-code setup and customization: You can do the setup yourself, brand the experience and change the rules, and you don’t need a developer for any of it.
- Clear reporting: program dashboards show how referrals are performing against your KPIs.
This short video shows how Yotpo Loyalty programs come together.
Other platforms
For a small program, any of LoyaltyLion, Smile.io and Rivo may be enough, as they offer referral features too. If you expect to grow, compare how each one handles customization, fraud checks and reporting first.
Step 5: Promote the program everywhere customers already are
Customers cannot share a program when they have never heard of it, and that is where many referral programs fail. Roll out yours with the same energy as a new product and keep reminding people after launch day.
- Email: A launch email announces the program. Later post-purchase messages can mention it again.
- SMS: A text with the link reaches people on the phone they’d share from anyway.
- On your site: Customers get guidance from a landing page linked from the account dashboard. Banners and pop-ups draw attention too.
- Social media: Followers who are invited to share their links can carry the program into their own networks.
- Packaging inserts: A card in the box reaches customers just as they unwrap a product they’re happy with.
Step 6: Track, learn, and adjust
Both your customers and your product range change over time. This is why your referral program needs ongoing attention. Put program reviews on the calendar at a regular interval, and let your platform’s analytics, such as the dashboard in Yotpo Loyalty & Referrals, answer most of your questions, including these:
- Which channels send your best referrals?
- Who are your top advocates? Have you thanked them?
- Is the reward influencing behavior as you hoped?
- Where in the funnel do people leave?
Then apply what you learn. You might A/B test your reward amounts, sharpen the landing page copy or try a new promotion channel. Your best advocates sell on your behalf, so it pays to give them something extra.
Fraud and Disclosure: Two Things to Plan For
When you give a reward, someone will try to cheat, so set your rules early. Common steps include delaying rewards until the return window closes and limiting rewards per household. It also helps to watch for strange activity, such as a spike of sign-ups from one device.
Disclosure deserves the same attention. According to the FTC’s guidance for social media posts, anything of value, including free or discounted products, counts as a material connection. That means an advocate who posts their link on social media in exchange for a reward should disclose it alongside the post. A short line in your program terms, encouraging advocates to say they earn a reward, keeps everyone on the right side of that.
Common Referral Marketing Mistakes and How to Avoid Them
Rules that take too long to explain
Sarah should be able to explain your offer to a friend in one breath. If she has to stop to check a list of conditions or decode vague terms, the friend loses interest and the referral won’t ever happen.
Rewards that do not fit
Go too small and nobody bothers to share. Go the other way, with a very large cash reward and no fraud checks, and you’re practically asking for abuse. The right amount sits somewhere in between, worthwhile for customers and still sensible for your margins.
A clunky experience
Broken links, codes that fail at checkout and confusing screens all make people give up. On a phone, test the full path yourself before you launch.
Launching and hoping
A published referral page is not a promotion plan. Place the program where customers already look, such as account pages, order confirmations and follow-up messages.
A clear offer that you promote steadily will usually do better than a clever program nobody understands.
Conclusion: Let Your Happiest Customers Do the Introducing
Although a referral code may look like a small piece of tracking, there’s a lot of trust behind it. It rewards the customers who speak well of you and gives the people who listen to them a warm welcome.
Begin with a clear goal, a fair two-sided offer, and a sharing flow that takes seconds. Next, promote the program, keep measuring, and plan to adjust as you learn. Keep in mind that any happy customer could be the start of your next sale.
Frequently Asked Questions (FAQs)
What does referral code mean?
It’s like a unique tag that ties a new customer back to whoever recommended the brand. The company uses it behind the scenes to credit the referral and to reward the advocate, the new customer or both.
How much should I offer as a referral reward?
There’s no magic number. Start with your average order value and margins, and ask what a new customer is worth over time. Then pick an amount you’d be fine paying for every successful referral, and try a second offer against it to see which gets more shares and purchases.
Do I need to enter a referral code when I sign up?
Not if the field says “optional.” Leave it blank if nobody gave you one. If a friend did pass you a code, it’s worth typing in: they usually get credit, and there may be a welcome reward in it for you. Some companies only accept codes during sign-up, so check the terms first.
Can referral programs be abused?
Yes, and the usual culprits are self-referrals and fake accounts, along with the occasional household that signs up again and again. The fraud prevention built into your platform catches a lot of this, and holding rewards until the return period ends helps too, as does reviewing unusual activity on a regular schedule.
When is the best time to ask a customer for a referral?
Ask when excitement is highest. For many customers, that’s the minute they finish checking out, but the day the order arrives can be just as good, and so can the moment after they leave a positive review. A platform connected to your loyalty program can send these invitations automatically, so you don’t have to time them by hand.
What is the difference between a loyalty program and a referral program?
A loyalty program is about retention, rewarding customers for their own repeat purchases. A referral program is about acquisition, so customers earn rewards for bringing in new shoppers. The two work best together, for example when a successful referral earns the advocate loyalty points.






Join a free demo, personalized to fit your needs