How to automatically add free gifts to cart in Shopify
Shopify makes it easy to run an online store. But when it comes to automatically adding free gifts to a customer’s cart, there’s a catch.
Shopify doesn’t offer this functionality natively, leaving store owners stuck with manual workarounds. This eats up valuable time and also creates friction in the customer journey. Confusing gift processes can lead to abandoned carts, missed sales opportunities, and customer service headaches when promised gifts aren’t delivered as expected.
Luckily, there’s a better way.
In this article, we’ll explore third-party Shopify apps that simplify the process by automatically adding free gifts, enhancing user experience, and boosting conversions. We’ll also cover best practices and effective implementation strategies to maximize results.
The value of adding automatic free gifts to your online store
Strategic free gift automation is a proven driver of business growth. By offering automatic free gifts, Shopify store owners can unlock several key benefits that translate directly into revenue and brand equity.
First, the average order value (AOV) increases as customers are motivated to spend more to qualify for the free gift.
In fact, research published in the Journal of Marketing found that sales of hand lotion jumped by 73% when offered in a bonus pack promotion compared to a superior price discount. This demonstrates the powerful psychological impact of perceived value over price cuts.
Automatic free gifts also enhance customer loyalty by offering added value that strengthens relationships, encouraging repeat purchases. This approach improves conversion rates by removing checkout hesitation. Customers feel like they’re getting more without putting in extra effort.
Additionally, high-quality gifts boost brand value by creating a premium shopping experience that enhances your brand’s reputation and appeal. Satisfied customers drive word-of-mouth marketing by sharing their positive experiences with others.
Here are some examples of common free gift scenarios for inspiration:
- Seasonal promotions to drive holiday sales.
- New customer acquisition strategies.
- Inventory clearance for slow-moving stock.
- Product launches to generate buzz and engagement.
Limitations of Shopify's free gift capabilities
Shopify currently lacks dedicated features for running automatic free gift campaigns.
While this limitation can be bypassed using Shopify’s discount system, it still falls short of delivering a fully automated experience. For example, you can create gift offers using discount codes or product combo bundles.
This method offers notable advantages:
- No additional costs from third-party app subscriptions.
- Seamless integration with existing store systems and checkout processes.
However, despite being cost-effective, this approach has a significant downside: it does not support the automatic addition of the gift to the customer’s cart. Customers must manually add the gift, which can lead to confusion, cart abandonment, and potential customer service issues if the gift is overlooked.
As confirmed by Dallas from Shopify’s Social Care team, the only way to automatically add a free gift to the cart is through the use of an app:
An app would be the best option.
This makes third-party apps the superior solution for offering a seamless, automated free gift experience on Shopify.
Top Shopify apps for automated gift promotions
Here are some of the best Shopify apps that streamline automated gift promotions, ensuring a seamless shopping experience and boosting sales.
BOGOS
BOGOS is a powerful Shopify app that automates BOGO (Buy One Get One) promotions and free gift campaigns, enhancing the checkout experience and boosting order value.
Benefits of BOGOS
- Customization. Create targeted promotions with conditions based on URL, location, and customer tags.
- Gift options. Automatically add free gifts to carts and showcase them with a gift slider for better visibility.
- Analytics. Track campaign performance, revenue impact, and AOV through built-in reporting tools.
- Support. Access fast live chat support for troubleshooting and campaign setup assistance.
Disadvantages of BOGOS
- Pricing. The monthly subscription costs can be expensive for smaller Shopify stores.
- Complex setup. Advanced promotional configurations require time and effort to optimize.
Key features
- Customizable conditions. Set specific triggers based on cart value, product type, or customer segments.
- Gift options presentation. Display free gifts dynamically using pop-ups, gift sliders, or inline product selections.
- Multiple promotion types. Supports BOGO deals, free gifts with purchase, bulk discounting, and tiered pricing strategies.
Pricing
- $23.99 to $79.99 per month (billed annually)
- $29.99 to $99 per month (monthly billing option)
- Free trial available for testing.
EasyGift
EasyGift simplifies free gift promotions for Shopify stores by automating gift additions, boosting AOV, and streamlining upsell strategies through product pairing. It enhances the customer experience by making gift redemption effortless and intuitive.
Benefits of EasyGift
- Automatic gift addition. Gifts are automatically added to the cart based on predefined rules, reducing friction during checkout.
- Customizable promotions. Set specific conditions – like minimum cart value or product combinations – to trigger free gifts.
- Scheduling. Schedule promotions such as BOGO deals to run during sales events or peak shopping times.
- Seamless integration. Works effortlessly with Shopify and supports new themes.
Disadvantages of EasyGift
- Limited advanced customization. Offers basic design options for promotional pop-ups and banners.
- Dependency on Shopify plan. Certain advanced features are only available on higher-tier Shopify plans.
Key features
- On-purchase upsell. Recommends related products during checkout to increase order value.
- Combination triggers. Create complex promotions using multiple conditions like product type, cart value, or purchase history.
- Multi-schedule. Run and manage several promotional campaigns simultaneously with flexible scheduling options.
Pricing
- $12.99 to $24.99 per month, with a free trial available.
Custom coding method: Step-by-step
While Shopify recommends using third-party apps for automatic free gift promotions, there’s an alternative for advanced users: custom coding.
For Shopify Plus users, Shopify Scripts offers a robust solution to automate gift additions during checkout. However, for those not on Shopify Plus, custom code can achieve similar results, though it comes with complexity and maintenance challenges.
Step #1. Create the free gift product in Shopify
- From your Shopify admin, navigate to Products → Add product.
- Name the product something like "Free Gift".
- Set the Price to $0.
- Uncheck Track quantity to avoid inventory issues during testing. If you plan to track inventory, ensure there’s enough stock available.
- In the Sales channels and apps section, you can exclude the product from your Online Store to prevent customers from finding it through normal browsing (optional). Alternatively, remove it from any visible collections.
- Click Save to finalize the product setup.
This free gift product will now be ready for use in your custom coding promotions or app-based campaigns.
Step #2. Copy the variant ID
Shopify provides a public product endpoint that returns a product’s details (including variants) in JSON format. This makes it easy to locate the variant ID needed for custom coding.

Here’s how to find it:
- Open the product page for your free gift in your Shopify store.
- Add .js to the end of the URL and hit enter. Example: https://yourstore.com/products/free-gift.js The browser will display the raw JSON data for that product.
- Search for the first instance of "Default Title" in the JSON data.
- Copy the ID that appears immediately before "Default Title". This is the variant ID you’ll use in the custom code later.
This variant ID is essential for automating the process of adding the free gift to the cart through custom scripts.
Step #3. Create and add the custom code snippet
Now, we’ll create a custom code snippet that:
- Checks the cart subtotal.
- Determines if the free gift is already in the cart.
- Automatically adds the gift if the subtotal is above or equal to a threshold (e.g. $50) and there’s at least one other item.
- Removes the gift if the subtotal drops below the threshold or if it’s the only item in the cart (to prevent a free-gift-only checkout).
Here’s what you need to do:
- Go to Online Store → Themes in your Shopify admin.
- Under the theme you want to edit, click the three dots next to it and select Edit code from the dropdown.

- In the Snippets folder, click Add a new snippet. Name it something like free-gift and click Create snippet.

- Paste the following code into the snippet file and replace:
- FREE_GIFT_VARIANT_ID with the variant ID you retrieved earlier.
- THRESHOLD_IN_CENTS with the cart value threshold in cents (e.g. 5000 for $50).
{% comment %} free-gift.liquid This snippet automatically adds or removes a free gift if the cart subtotal is above or below a certain amount. {% endcomment %} {% assign free_gift_variant_id = 11122233344 %} {% comment %}{# <--- REPLACE WITH YOUR VARIANT ID #}{% endcomment %} {% assign threshold = 1000 %} {% comment %}{# <--- e.g., 5000 cents = $50 #}{% endcomment %} {% assign gift_quantity_in_cart = 0 %} {% for item in cart.items %} {% if item.variant_id == free_gift_variant_id %} {% assign gift_quantity_in_cart = item.quantity %} {% endif %} {% endfor %} {% comment %} If you want to handle bundling multiple free gifts based on bigger thresholds, or 1 free item per X dollars, you'd do that logic here. For now, we just do 1 item. {% endcomment %} <script> document.addEventListener("DOMContentLoaded", function() { var giftVariantId = {{ free_gift_variant_id }}; var threshold = {{ threshold }}; var cartSubtotal = {{ cart.total_price }}; var giftQuantityInCart = {{ gift_quantity_in_cart }}; var totalItemsInCart = {{ cart.item_count }}; // If the free gift is the only thing in the cart, treat that as 0 "real" items var hasOtherItems = totalItemsInCart > giftQuantityInCart; // Decide if we need the free gift. var shouldHaveGift = (cartSubtotal >= threshold) && hasOtherItems; if (shouldHaveGift) { // If the free gift isn't in the cart, add it. if (giftQuantityInCart < 1) { updateGiftQuantity(1); } } else { // If the gift is in the cart but we no longer qualify, remove it. if (giftQuantityInCart > 0) { updateGiftQuantity(0); } } function updateGiftQuantity(qty) { var headers = new Headers({ 'Content-Type': 'application/json' }); var data = { updates: {} }; data.updates[giftVariantId] = qty; fetch('/cart/update.js', { method: 'POST', headers: headers, body: JSON.stringify(data) }) .then(function() { // Refresh the cart page to show changes location.reload(); }); } }); </script>
- Save the snippet.
This script ensures the free gift is automatically managed based on your set threshold and cart conditions.
Step #4. Include the snippet in the cart
In the Edit Code area, find and open either cart.liquid (under Templates) or cart-template.liquid (under Sections). Different vintage themes can label it differently. If your theme doesn’t have a cart.liquid or cart-template.liquid file, it likely means one of two things:
- You’re using a cart drawer or cart popup (common in more modern or premium themes).
- Your theme is an Online Store 2.0 (OS 2.0) theme, where the cart might be built differently (for example, it could be a template named main-cart.liquid or a cart.json template).
⚠️ The gift-wrapping (or free-gift) snippet from Shopify’s tutorial only works on a full cart page (i.e. a URL like yoursite.com/cart). It can break in a drawer or popup because the snippet relies on reloading or updating the standard cart form on a dedicated page.
Here’s how to switch your cart style to a cart page if you want the code to work exactly as in the tutorial:
- In your Shopify admin, open Online Store > Customize.
- On the left-hand sidebar or in the theme settings, look for Cart or Cart settings.
- See if there is a toggle or setting for “Cart type” or “Cart behavior” set to “Drawer” or “Popup.”
- If it says Drawer or Popup, then your theme is set up to show a slide-out or pop-up cart. If you want to use a separate cart page (so you can insert this snippet easily), look for an option that says Page and switch to that. Some themes let you switch from drawer to page.
Here’s how to find the correct spot for your free-gift snippet:
- OS 2.0 themes often have their cart code in a section named main-cart.liquid or cart-items.liquid, or they use a cart.json template, depending on how the theme is structured. So, under Templates, look for cart.liquid, cart.json, or possibly page.cart.liquid.
- If you see cart.json, open it and see which Sections it references. There might be something like:
That tells us our main cart layout is pulled from a section named main-cart-items. - Open Sections and look for main-cart-items.liquid or something similar.
- Inside that file, search for a </form> tag or for a <form> that references action="/cart".
- Right above </form>, add:
{% render 'free-gift' %}
- Save your changes.
The final result will look like this:
With this integration:
- The free gift will be automatically added or removed based on the cart subtotal and product conditions.
- The process will be streamlined for customers, providing a seamless checkout experience without manual actions or confusing gift redemption steps.
Your Shopify store now has automatic free gift functionality!
Essential best practices for automatic free gift campaigns
To run a successful automatic free gift campaign on Shopify, follow these five best practices:
1. Strategic gift selection
Choose high-value, relevant gifts that align with your brand and resonate with your audience. The right gift enhances customer perception and strengthens brand loyalty.
Pro tip: Run A/B tests with different gift options to see which ones drive the highest conversion rates.
2. Create gift tiers
Encourage customers to spend more by offering tiered rewards (e.g. spend $50 for a small gift or $100 for a premium gift).
This strategy broadens the campaign’s appeal and maximizes revenue by incentivizing higher-value purchases.
3. Clear messaging
Transparency builds trust. Clearly communicate:
- Eligibility criteria
- Promotion duration
- Gift details
This reduces friction during checkout and prevents customer service issues related to misunderstandings.
4. Set clear parameters
Define essential campaign boundaries such as:
- Timeframe
- Purchase thresholds
- Qualifying products
These parameters create urgency and help manage inventory without overextending your store’s resources.
5. Strategic timing
Timing is everything. Launch free gift promotions during key sales periods like holidays, product launches, or customer appreciation events. This creates a sense of exclusivity, increasing customer motivation and boosting conversions.
By implementing these strategies, you can ensure your automatic free gift campaigns drive sustainable growth, boost AOV, and enhance customer satisfaction.
Transform your store with automatic free gifts
Automatic free gift promotions are a powerful strategy for driving measurable growth. They help increase AOV, enhance customer loyalty, and improve conversion rates, all while elevating your brand’s perception through a premium shopping experience.
While Shopify doesn’t natively support automatic free gift additions, third-party apps like BOGOS and EasyGift bridge this gap by offering automated gift management and more.
What’s next?
- Identify the right free gift app for your Shopify store.
- Implement best practices and strategies outlined in this guide.
- Launch your free gift campaigns and start achieving your business goals.
With the right tools and approach, you can transform your Shopify store and offer an engaging shopping experience that keeps customers coming back.