Shopify free gift with purchase: set it up with a discount code

Topic
Development
Published
Reading time
7 min read
Written by
Binaery

You can run a Shopify free gift with purchase offer today without an app. It's a discount type called Buy X get Y, and it works as a code the shopper types in or as an automatic discount. There's one catch that trips up most first attempts: Shopify never puts the gift in the cart for the shopper.

By the end of this you'll have the offer set up, you'll know how to deal with that catch, and you'll know where the built in discount stops and something custom begins.

The short version

  • In your admin, go to Discounts, create a discount, and choose Buy X get Y. Set what the customer has to buy, what they get, and set the gift's value to Free.
  • Choose a discount code for a campaign (an email, a creator, a first order). Choose an automatic discount when the gift is for everyone.
  • The shopper has to add the gift to the cart. The discount only makes it free once it's there.
  • A minimum spend counts product prices only, at full price, and only the products you listed under what the customer buys.
  • Limit the code to one use per customer, and cap the gifts per order.
  • If you need the gift added for the shopper, or a rule the form doesn't offer, that's a Shopify Function. It's a developer's job.

Here's the whole offer as you'd fill it in. Spend $60 on candles, get a travel candle free:

Customer buys:   Minimum purchase amount, $60
Any items from:  Specific collections, All candles
Customer gets:   Quantity 1, Travel candle
At a discounted value:  Free
Maximum number of uses per order:  1

Those are the names of the fields on Shopify's Buy X get Y form, with one example answer each. The first two lines are the condition, the next two are the gift, and the last one stops a big order from walking off with six of them.

A code or an automatic discount

Shopify's page on Buy X get Y discounts offers both methods, and the difference is who the gift is for.

  • A discount code is for a group you choose. The shopper adds the products and the gift, then enters the code at checkout. Use it for an email to past customers, a creator's audience or a first order.
  • An automatic discount is for everyone who qualifies. The shopper adds the products and the gift, and the discount applies by itself. Use it for a sitewide offer during a sale.

Either way you can narrow who's eligible: all customers, specific customers, customer segments or markets.

Setting it up, step by step

  1. From your Shopify admin, go to Discounts and click Create discount.
  2. Choose Buy X get Y.
  3. Under Method, choose Discount code and name the code, or choose Automatic discount.
  4. Under Customer buys, choose a minimum quantity of items or a minimum purchase amount, then pick the products or collections that count.
  5. Under Customer gets, set the quantity and pick the gift product. Under At a discounted value, choose Free.
  6. Tick the box to set a maximum number of uses per order, and enter 1.
  7. Under Eligibility, choose who can use it.
  8. Under Maximum discount uses, limit it to one per customer. If the code might end up on a coupon site, cap the total uses too.
  9. Decide whether it can be combined with other discounts, set the start and end dates, and save.

One detail on the dates: the discount starts and ends in the time zone set in your Shopify admin, at 12:00 a.m. on the start date. If your customers are three hours behind you, so is their idea of when the sale starts.

The catch: the gift isn't added for the shopper

Shopify is direct about this. Customers must add all items to their cart themselves, and the free item is never added automatically. A shopper who spends $60, types the code and doesn't have the travel candle in the cart gets nothing, and may not know why.

So the job is to make the gift impossible to miss. There are three places to do it.

Before the cart. Say what the gift is, and what it's worth, where the shopper decides. This is a buy box we designed for a protein brand. Under the delivery choices there's one line: a free whisk with your first subscription order, with its $29 value beside it.

Buying options on the product page, as designed Protein brand Buying options on the product page, as designed

In the cart. A line that appears once the shopper has spent enough, with a link to the gift:

{% if cart.total_price >= 6000 %}
  You've earned a free travel candle.
  <a href="/products/travel-candle">Add it to your cart</a>
{% endif %}

That reads: if the cart is worth $60 or more, show this message. Shopify counts cart prices in cents, so $60 is 6000. It doesn't add the gift, but it puts the gift one tap away. Our article on what belongs in a cart drawer covers where a line like this should sit.

In the link you send. For a code, Shopify can make a shareable link. Open the discount, click Promote, then Get a shareable link, and choose the page it opens. Point it at the gift's product page. The discount is then applied to the shopper's cart without anyone typing a code.

How the minimum spend is counted

This catches people out the day the offer goes live, so it's worth five minutes now. According to Shopify:

  • The minimum counts product prices only. Shipping and taxes are never included.
  • Only products listed under Customer buys count toward it.
  • Products count at full price, before any other discount. If another product discount has already been applied to an item, that item doesn't count at all.
  • Paying with a gift card or store credit doesn't change the amount.

A worked example: is the gift worth giving

Made up numbers. Say your average order is $48 and the travel candle costs you $4 to make. You set the gift at a $60 spend.

  • An order that would have been $48 becomes $60 or more. That's at least $12 of extra revenue.
  • Say your margin on candles is 65%. The extra $12 carries about $7.80 of margin.
  • The gift costs you $4. You're ahead by about $3.80 on that order, before shipping the extra weight.
  • An order that was already $70 gets the gift too, and on that one you're simply down $4.

So the offer pays when it moves enough orders up over the line to cover the gifts you hand to orders that were already there. Set the line a little above your average order, not below it. Our article on raising average order value goes further into choosing that number.

Where the built in discount stops

  • It can't add the gift. No setting changes that.
  • It doesn't apply on the post purchase page. Shopify says Buy X get Y discounts made in the admin don't work on the offer page shown after checkout.
  • It only knows the rules on the form. Shopify's developer docs give examples of what the form can't do: leaving certain cart lines out, tiers that depend on several things at once, or a discount for items with a particular property, like an engraving.

For those, a developer writes a small program called a Shopify Function that runs inside checkout. We cover that in a free gift built as a discount Function. Most stores never need it. Run the built in version first and see whether the catch costs you anything.

Before the offer goes out

  1. Check the gift product is in stock and can be added to a cart.
  2. Create the discount and place a test order: with the gift, without it, and just under the minimum.
  3. Limit it to one per customer and one gift per order.
  4. Say the gift and its value on the product page and in the cart.
  5. If it's a code, send a shareable link that opens on the gift.
  6. Check the start and end dates against your store's time zone.
  7. After a week, compare average order value and the number of gifts given.

Common questions

How do I offer a free gift with purchase on Shopify?

Create a Buy X get Y discount. In the Shopify admin, go to Discounts, click Create discount and choose Buy X get Y. Set what the customer has to buy, choose the gift under Customer gets, and set its discounted value to Free. It can be a discount code or an automatic discount, and it needs no app.

Does Shopify add the free gift to the cart automatically?

No. With a Buy X get Y discount, customers must add every item to their cart themselves, including the free one. The discount makes the gift free once it's in the cart. To add a gift for the shopper you need an app or custom development.

Can I offer a free gift on Shopify without a discount code?

Yes. Choose Automatic discount as the method when you create the Buy X get Y discount. The shopper still adds the qualifying products and the gift to the cart, and the discount applies by itself with no code to enter.

Can a free gift on Shopify require a minimum spend?

Yes. Under Customer buys, choose Minimum purchase amount and enter the amount. Shopify counts product prices only, at full price, and only the products or collections you select. Shipping and taxes aren't included.

Next step

Create the discount today, limit it to yourself under Eligibility, and place three test orders: one with the gift in the cart, one without, one a dollar short. You'll see the catch for yourself, which is the fastest way to decide how loudly the cart needs to mention the gift. If you'd like the offer designed into the product page and the cart, that's the kind of work we do every month. Tell us about your store and one of us will write back within 48 hours.

Keep reading.

Rather have us do it?

Everything in this article is something we do for a living. Tell us about the store and what you're trying to move.

Get a quote