Shopify Discount Code Auto-Apply Tutorial: 3 Shareable Discount Link Setup Methods

In Shopify, the most direct and officially recommended way to let customers click a link and have a discount code automatically applied is by using a Shareable Discount Link.

Below are the most commonly used methods:

Method 1: Use Shopify’s Official “Shareable Discount Link”

When customers click the link and visit your store, Shopify automatically stores the discount code in their browser cookies. Once they add products to the cart and proceed to the Checkout, the discount code will be applied automatically without requiring manual entry.

Basic URL format:

https://yourdomain.com/discount/your-discount-code

Test link: https://orngstudio.com/discount/TESTDISCOUNT

Steps:

  1. Go to your Shopify admin and click Discounts from the left-hand menu.
  2. Click the discount code you want to use.
  3. Next to the title at the top of the page, click Promote > Get shareable link.
  4. Copy the link and paste it into your landing page, ad, email, or social media post.
Shopify shareable discount link settings screen

Method 2: Automatically Apply a Discount Code and Redirect to a Specific Page

By default, the link in Method 1 redirects customers to your store’s homepage. If you want customers to click the link, apply the discount code, and go directly to the Cart or a specific product page, you can add the ?redirect= parameter to the URL.

Redirect to cart:

https://yourdomain.com/discount/your-discount-code?redirect=/cart

Test link: https://orngstudio.com/discount/TESTDISCOUNTTOCART?redirect=/cart

Redirect to a specific product page:

https://yourdomain.com/discount/your-discount-code?redirect=/products/product-handle

Test link: https://orngstudio.com/discount/TESTDISCOUNTTOPRODUCT?redirect=/products/shopify-backend-training-3hours-beginner

Note: The discount will appear on the final Checkout page. Depending on the theme, some cart drawers or cart pages may not display the discounted amount immediately, but the discount should appear once the customer proceeds to checkout.

Method 3: Set Up Automatic Discounts

If you do not want customers to click a specific link, and instead want the discount to apply automatically when certain conditions are met, such as reaching a minimum order amount or purchasing specific products, you can set up automatic discounts directly in Shopify admin.

Steps:

  1. Go to Discounts in your Shopify admin.
  2. Click Create discount in the upper-right corner.
  3. Select the discount type you want to create.
  4. In the “Method” field on the settings page, choose Automatic discount instead of a discount code.
  5. Set the conditions and save. Once customers add eligible products to the cart, the discount will be applied automatically.
Note: You can have up to 25 active automatic discounts across your store at the same time.
Shopify automatic discount settings screen

Want to create your own Shopify store?