Skip to content

Unique discount codes on Shopify: how to stop coupon leaks

By Kodra Apps · · 4 min read

A welcome code shared by everyone can end up on a coupon site. Unique single-use codes keep the discount for the people who actually signed up.

A welcome discount is meant for people who sign up to your email list. With one shared code, it often reaches a lot more people than that. This guide explains how popup codes leak, what Shopify's built-in settings can and cannot do about it, and how unique single-use codes keep the discount where it belongs.

How a shared code leaks

A shared code is one code, for example WELCOME10, that every subscriber receives. It is easy to set up, and it is just as easy to pass on:

  • Customers share it with friends or post it in groups and forums.
  • Coupon websites collect codes and list them for anyone searching for "your store discount code".
  • Browser extensions that test coupon codes at checkout pick up codes that work and offer them to other shoppers.

Once a code is public, people who never gave you their email get the same discount. You pay for a discount that did not bring in a subscriber, and the code keeps working until you notice and turn it off.

Shared vs unique codes

Shared codeUnique single-use code
Who receives itEveryone gets the same codeEach subscriber gets their own code
If it is posted onlineAnyone can use itIt works once, then stops
TrackingYou see how often it was usedYou can tell which sign up led to which order
SetupOne discount in Shopify adminUsually created by an app through the Shopify API

What Shopify's discount settings can do

When you create a discount code in Shopify admin, you can limit it in several ways:

  • Limit to one use per customer: the same customer cannot use the code twice.
  • Limit the number of times it can be used in total: the code stops working after a set number of uses.
  • Active dates: a start date and an end date.
  • Minimum requirements and combinations: a minimum order amount or quantity, and whether the code can be combined with other discounts.

These limits help, but they do not solve the leak. A shared code limited to one use per customer still works for every new customer who finds it online. A total usage limit stops the leak only by stopping the code for your real subscribers too.

Why unique single-use codes fix it

With unique codes, every subscriber gets a code that exists only for them and works for one order. If someone posts their code online, the first person to use it is the only one who can. Everyone else sees that the code is no longer valid.

Creating one code per subscriber by hand is not practical, so this is usually done by an app that creates each code in your store through the Shopify API at the moment a visitor signs up or wins.

Add a real expiry

A code without an end date stays open for as long as you forget about it. Give popup codes an expiry, for example a number of days, or a shorter window if you want the visitor to use it in the same session. If you show a countdown, make it match the real expiry of the code. A countdown that resets or has no effect can mislead customers. The guide on consent and honest urgency explains why that matters.

Apply the code automatically

When the code is applied at checkout without the visitor copying it, there is less friction and less reason to open a new tab to search for other codes. Shopify supports discount links in the form your-store.com/discount/CODE, which apply the code when the visitor reaches checkout. Popup apps can apply the code in a similar way right after the win.

More guard rails

  • One code per email. Without it, the same person can sign up again with the same address and collect another code.
  • A recognizable prefix. Codes such as WIN-7K2Q9M make it easy to see in Shopify which orders came from the popup.
  • A fallback code for errors only. If you keep a shared backup code in case a unique code cannot be created, show it only when that happens, never in the page source.

Measure what the codes bring in

Unique codes make reporting easier. Count how many popup codes were used and how much revenue those orders brought in. If you also see where the shopper came from, for example a campaign tag or an ad click, you know which traffic turns into orders through the popup.

How Kodra Play handles codes

Kodra Play creates a unique, single-use discount code for every winner in your Shopify store, with your own prefix, and applies it at checkout automatically. Each email can claim one discount, codes can have a real expiry countdown, and reward tiers give a better discount for winning on the first try. The stats show code uses and revenue per popup, plus traffic source. A shared fallback code, if you set one, is used only when a unique code cannot be created and is revealed only after a win. Read more about the setup in the getting started guide.

More from the blog