← Help

Magic links

Share a link in an email, ad or post, and anyone who arrives through it gets your discount automatically, with no code to type.

How it works

A magic link is your store’s address with a parameter added to the end, such as yourstore.com/?ref=instagram. When a shopper opens it, the app recognises the parameter and applies the discount you set up. It works on any page of your store, so you can add the same ending to a product or collection link.

The app stores the link in the shopper’s cart, so the discount carries on applying as they browse and go to checkout. In Shopify it’s an automatic discount, named after your magic link.

Magic links need the app’s theme embed switched on. See Getting started if you haven’t done that yet.

Set it up

  1. In the app, open Discount Campaigns and click Create a campaign.
  2. Find Magic link and click Create.
  3. Under Magic link details, enter an Internal name and set Status to Active when you’re ready for it to work. Draft and Paused links don’t apply a discount.
  4. Under Link parameters, enter a Parameter name (for example ref) and a Parameter value (for example instagram). The Link preview shows the ending to add to your store’s address.
  5. Set up the discount in one or more of Product discounts, Order discounts and Shipping discounts. At least one needs a value above zero.
  6. Optionally, fill in Short URL (optional), Popup experience (optional), Combinations, Activation limits and Schedule (see below).
  7. Click Save in the save bar at the top of the page.

After saving, click Preview for testing to open your store with the popup forced to show, even if you dismissed it earlier.

Choosing a parameter

  • The value isn’t case-sensitive: ?ref=Instagram and ?ref=instagram both work.
  • qr is kept for QR codes, so you can’t use it as a parameter name.
  • If another magic link already uses the same parameter and value, the form warns you. Only one of them will be active at a time.
  • If you want people to share a link but not guess others, use a value that’s hard to guess, such as win-x7k2m9p4 rather than 10off.

Discount options

A magic link can combine a product, order and shipping discount in one link. Product discounts can be a Percentage, a Fixed amount or a Free gift, and can apply to chosen products, collections, vendors or product types. Each section can have its own minimum purchase requirement. Use Combinations to choose whether it stacks with your other discounts.

If you choose Free gift, pick how shoppers get it: Manual, Manual - Show popup (a popup lets them choose a gift) or Auto add to cart.

What shoppers see

Tick Show popup when the link matches under Popup experience (optional) to greet shoppers who arrive from the link. You can set a Heading, Body, button labels, an image and a terms link. The discount is already applied, so the buttons just close the popup. Once closed, it won’t open by itself again during that visit.

Without a popup, the discount simply shows up in the cart and at checkout. The popup isn’t available with the Auto add to cart or Manual - Show popup gift options, which use their own flow. Change the popup’s colours and fonts in Storefront display.

Short URLs

Enter a Short URL path such as /go/vip to get a tidy address like yourstore.com/go/vip that redirects to your link. It’s handy for print, SMS or anywhere a long link looks messy. The app adds it to your store as a Shopify URL redirect. The path must start with / and can’t contain spaces or a ?. If the path can’t be set up, for example because another redirect already uses it, the link still saves and a Short URL issue banner explains what went wrong.

Limits and scheduling

  • Usage limit: the most orders that can use this link. When it’s reached, the status changes to Ended (usage limit reached) and the discount stops.
  • Expires after (hours): the clock starts the first time anyone opens the link. When time’s up, the status changes to Expired (time limit reached).
  • Schedule: choose Run this rule continuously or Run this rule for a specific time period with a start and end date.

To bring back an ended or expired link, set its Status to Active and save. For a link that hit its usage limit, raise or clear the limit first.

See how it’s doing

The magic link’s edit page shows when it was first opened and how many orders have used it. For revenue, orders and average order value, open Analytics and click the magic link to see sales by product and each order.

Stuck? Email hello@behaviour-discounts.co.uk with your store address and what you’re trying to set up.

Related guides