Free gift guide
How to offer a free gift with purchase in Shopify without an app
What you’ll need
The variant ID (or the admin link)
How to get this: The variant ID
- Open the product, then click the variant. The ID is the number after /variants/ in the web address.
- You can paste the whole link instead; the tool finds the number.
Shopify’s free GraphiQL app (with read_products, write_discounts access)
How to get this: Shopify’s free GraphiQL app
- Install it once from shopify-graphiql-app.shopifycloud.com: enter your store address, tick the access listed here, click Install and approve.
- Then open it any time from Apps › Shopify GraphiQL App in your admin.
A duplicate of your theme to test on
How to get this: A duplicate of your theme to test on
- Online Store › Themes › … on your theme › Duplicate.
- Make the change on the copy, preview it, and publish only when it works.
The theme code editor (to paste a snippet)
How to get this: The theme code editor
- On the copy of your theme: … › Edit code.
- Hover the snippets folder, click New File…, name it as the tool says, paste and Save.
Two parts
The discount decides the price: the gift is free only when the cart qualifies. The snippet only moves the gift in and out of the cart. If the discount isn’t active, the snippet sees the gift isn’t free and takes it straight back out, so nobody is charged for it.
Store-wide gifts need a collection
Buy X Get Y can’t use “all products”. Make an automated collection with “Price is greater than 0” and “Tag is not equal to gift”, tag the gift product “gift”, and use that collection.
Steps
- Build the discount with the kit (GraphiQL, CLI or admin steps).
- Duplicate your theme, add the snippet to the copy, and render it from theme.liquid.
- Run the test checklist on a development store.
- Publish the copy.
More guides
Sources: Shopify Help Center: Combining discounts, GraphQL Admin API 2026-10: discounts.