How a discount code works
A discount code is a short string a shopper types at checkout to reduce what they pay. The reduction can be a share of the price, a fixed amount off, free delivery, or a gift added to the order. Around it sit the rules: a minimum spend, excluded products or categories, an expiry date, one use per customer, first order only, or a limit on how many times the code can be used in total.
Those rules are the whole design. A code without them is an open invitation to buy your cheapest item repeatedly at a loss. There are two broad kinds. A shared code is public and attached to a campaign, so anyone can use it and anyone can pass it on. A unique code belongs to one person, which costs more to administer but tells you exactly who redeemed it.
Why discount codes matter
They give a hesitant shopper a reason to decide now rather than later, which is why they appear in cart recovery emails and first-order offers. They also do a job no analytics tool does well: a unique code is one of the few ways to connect an offline conversation, a printed flyer, a radio mention or a creator’s post to an actual sale.
Used with segments, they become precise. A win-back offer sent to customers who have gone quiet costs you nothing on the customers who never needed it, because they never see the code. That is a far better use of margin than a site-wide sale that discounts everyone, including the people who were about to pay in full.
Where discount codes go wrong
An empty code field at checkout is an invitation to leave. A shopper who did not have a code now believes one exists, opens a new tab to hunt for it, and a proportion of them never come back. Collapsing the field behind a small link, or removing it when no campaign is running, keeps the checkout honest.
Shared codes also leak. A code meant for lapsed customers ends up on a coupon site and becomes a permanent site-wide discount you did not budget for; unique, expiring codes stop that. The slowest damage is behavioural: predictable discounting teaches customers to wait, and full-price sales gradually become discounted ones. That is margin erosion, and it is hard to reverse once people have learned the pattern.
How to act on it
Decide what a code is for before you create it. Acquiring a first-time buyer, recovering an abandoned basket, clearing slow stock and thanking a loyal customer are different jobs, and each deserves its own rules, its own audience and its own expiry.
Set the minimum spend so a redeemed order still covers its costs, and exclude the lines whose contribution margin cannot carry a reduction. Then judge the campaign on incremental orders rather than on redemptions, because a code redeemed by someone who was already buying has cost you money and produced nothing. If you cannot tell the difference, run the offer to one segment and hold a comparable segment back.