There are key benefits to using Gift With Purchase (GWP) offers in your sales strategy. First, GWP offers inspire brand loyalty when word spreads about your free gifts. Second, you can use GWP offers to manage your inventory (buy X get Y). Finally, GWP inspires your customers to spend more which increases your AOV.
Rebuy's free gifts functionality allows businesses to align promotional strategies with rules based on cart value, products, or combinations. It becomes even more effective when combined with Rebuy's Smart Cart V2.
With the Gift With Purchase (GWP) widget, Rebuy makes it easy to create GWP campaigns that help you boost sales on BFCM and beyond. For example, when a GWP offer is accepted Rebuy automatically adds the gift to the cart for instant satisfaction. Because your customer doesn't have to search around to add the gift item themselves, you save them time.
NOTE: The Gift With Purchase Widget doesn't show items offered, as it simply handles the automatic adding of the free gift to the customer's cart when specific conditions are met. There is no interface for the customer to interact with.
If you wish to show a visual component for your free gift promotion, consider using the Smart Cart's Tiered Progress Bar to offer a free gift:
Installation Instructions
Step 1: Create a New Gift With Purchase Widget
Create a new widget as shown below in Rebuy Admin.
Step 2: Configure the Widget's Data Source
In the General setting of the widget editor you will see Data Source. Click the "edit" link to open the connected Data Source Rule Builder that has been created for this widget.
An example of how this is used is saying: IF Cart Subtotal is GREATER THAN X amount of $ RETURN Free Item. You can also say IF Cart Subtotal is GREATER THAN X amount of $ AND/OR Products/Collections CONTAINS/ CONTAINS ANY (etc) RETURN Free Item. When setting up conditions for free gifts, be cautious with OR statements. Ensure each "OR" block includes all applicable conditions such as cart subtotal. For example, use "Cart Subtotal >= $50 OR Cart Subtotal >= $100" rather than "Country = US OR Cart Subtotal >= $50" which can create ambiguous configurations. For product-specific inclusions, "Products Contains Any" is recommended over "If Product Equals" as it ensures the free gift adds regardless of whether the specific product is the sole item or part of a larger cart.
NOTE: GWP widgets are not compatible with Subscription products.
Only one-time purchase variants can be selected and returned using the GWP widget's Data Source rules. However, subscription products can still be used as the input (trigger) product.
Step 3: Enable the Gift's Product Discount using Shopify Functions
Rebuy now supports product discounting using Shopify Functions directly within the GWP widget's settings. To enable the discounting of products both in the widget and throughout the customer's cart and checkout experience, simply toggle on the "Use Shopify Functions (Recommended)" option below and input the specific discount you are looking to apply to the gift product(s) offered via the GWP widget. You can configure a "Fixed" discount, or "Percentage" based discount using this feature.
For more information on how discounting works with Shopify Functions via Rebuy, please refer to our Rebuy Discounting Overview guide linked below.
NOTE: If you only want to show a "visual" discount (i.e., Rebuy will display the discount in the widget, but will not apply the discount once the products are added to the cart), toggle off the Shopify Functions setting.
Step 4: Install the GWP Widget
If you do NOT want your widget to be visible to your customers, then be sure to toggle live mode OFF prior to installing the widget. The live mode setting is toggled ON by default. To understand the definitions of "installed," "uninstalled," and "live mode," you can refer to the Rebuy Widget Installation Definitions help article for more information.
After clicking the "install" button, a new window will open with specific instructions for you to follow to complete the install process. These instructions may include copying and pasting code, configuring settings, or other steps. It is important to follow these instructions carefully to ensure a successful installation.
NOTE: Since the gift with purchase widget is more of a global widget, you should install the widget within the theme.liquid file instead of app blocks even if you have access to app blocks. For more information on manually installing widgets, you can visit our help article that outlines that installation method.
Additional Settings
Gifts Without Purchase
We've recently updated the Gift With Purchase (GWP) widget settings, impacting how gifts are managed in carts:
Default to enabled for all pre-existing GWP widgets: By default, all existing GWP widgets will allow adding gifts to an empty cart.
Default to disabled for all future GWP widgets: By default, newly created GWP widgets will not add gifts when the cart is empty, and will automatically remove any gifts if they are the only remaining items in the cart
This update aims to prevent situations where free gifts remain in the cart after all paid products have been removed!
To adjust these settings, navigate to:
Gift With Purchase Widget's Settings -> General Tab -> GIFTS WITHOUT PURCHASE.
Quantity Selectors
The widget allows the option to hide the quantity selectors on all items added from this widget. This requires the use of Rebuy Smart Cart also, the quantity selectors will not be hidden in theme carts.
To adjust this settings, navigate to:
Gift With Purchase Widget's Settings -> General Tab -> Quantity Selectors
Best Practices
Optimizing Free Gift Performance
Transition from legacy systems to Smart Cart V2 for enhanced feature compatibility.
Use Shopify Functions for creating customized discounts and advanced logic.
Regularly evaluate and update your data source and rules to adapt to dynamic business requirements.
Always double-check compatibility settings in Shopify when combining discounts.
Test discounted promotions thoroughly before making them active.
When troubleshooting discount issues, verify both Rebuy Order Discount and Rebuy Product Discount settings in Shopify admin.
Date Scheduling using the Data Source
When editing the data source, it is best to set the time period for the specific sale. This way you don't have to lift a finger when the sale period launches.
Widget Settings
Since there is no visual aspect to the Gift With Purchase Widget, no editing of the layout is required. If you're using Rebuy's Smart Cart we will automatically set the add to cart redirect to none. If you WANT it to redirect to the cart, you can change the settings shown below.
Could not display content
Could not display content
Prevent discount caching by disabling the Discount in Rebuy Admin once your promotion has ended
To prevent discounts from being cached when a customer has added a product to their cart via a Rebuy widget (such as manually through a Product Page widget or automatically via a Gift With Purchase widget), you will need to ensure that the Shopify Functions Discount is set to "None" in the widget's settings once your promotion has ended:
Why does this happen?
Rebuy's Shopify Functions-generated discounts are attribution-based. If the product line item in the customer's cart still contains the Rebuy widget attribution data (even after the widget is disabled), the discount configured in the widget's settings will still apply.
⚠️ WARNING: Even if the Rebuy widget is disabled and set to Preview Mode in Rebuy Admin, the associated discount will remain active. Therefore, you must follow the steps above to fully disable the discount and prevent it from being applied.
Important Considerations
Disclaimer: The Smart Cart data is sourced from Shopify's cart.js and persists for up to 14 days. This means it's possible for customers to still receive free gifts even after the free gift feature has been disabled or removed. If a customer added the gift to their cart prior to the change, the item will remain in their cart unless they clear their browser cache.
We Recommend Enabling the Storefront API!
For the best discounting experience, we highly recommend enabling the Storefront API. Here's why:
Accurate, Real-Time Discounting: The API ensures that discount codes are validated instantly, preventing errors and delays during checkout.
Support for Multiple Discounts: It allows your customers to apply multiple discounts at once, enhancing their shopping experience.
Improved Checkout Process: Real-time feedback helps customers know immediately if their discount code is valid, reducing confusion and improving satisfaction.
⚠️ Issue: Products Not Removed from Cart After Discount
If you're NOT using the Storefront API, you might notice that products which no longer qualify for a discount (like a free gift) are not being removed from the cart after the discount is applied. This happens because the discounting method you're using is deprecated.
To fix this issue and streamline your discounting process, we strongly recommend enabling the Storefront API. It will ensure:
Discounts are applied correctly in real time.
Products are removed from the cart when they no longer meet the discount criteria.
A cleaner, more robust discounting function overall.
🛠️ Alternative Workarounds
If enabling the Storefront API isn't an option, consider these workaround tactics:
Flag Orders for Manual Review
Set up a system to flag orders that don't qualify for the free gift or discount, so you can manually review and correct them later.Adjust Discount Thresholds
Raise the discount or free gift threshold so you're comfortable with the possibility of the discount being applied in edge cases, even when it's not strictly valid.
GWP Validation at Checkout
Rebuy's GWP validation logic can run actively during the Shopify checkout process. When active, the GWP watcher monitors cart changes and re-evaluates data source rules to ensure that any gift items in the cart remain valid. If a customer removes qualifying items and no longer meets the gift conditions, the watcher automatically removes the gift from checkout.
This section covers how checkout GWP validation works, what requirements apply, how to handle automatic gift removal at checkout, and a newer setting — Treat as Gift With Purchase — that extends this behavior to checkout offer (recommendation) widgets.
Shopify Plus Only: All GWP validation at checkout requires Shopify Plus. This feature uses checkout extensions, which are only available on Shopify Plus plans.
Requirements
For GWP validation logic to run at checkout, all three of the following must be true:
The store is on Shopify Plus
The merchant has at least one active checkout widget on their checkout page — this can be a checkout recommendation widget, a checkout progress bar, or a checkout content block
The gift item in the cart carries GWP widget attribution — either from a standard GWP widget, or from a checkout offer widget with Treat as Gift With Purchase enabled (see below)
Without an active checkout widget, the validation logic will not be triggered regardless of other settings.
How GWP Validation Works at Checkout
When a customer proceeds to checkout, the GWP watcher checks whether the items in their cart still meet the data source rules for any active GWP widgets. If conditions are no longer met — for example, the customer removed items that dropped their cart subtotal below the qualifying threshold — the gift is automatically removed from the checkout.
Rebuy also automatically removes GWP items from checkout when an applied discount code overrides their free status. This protects customers from being charged full price for an item they expected to receive for free. Because Shopify does not allow customers to manually remove items during checkout, this automatic removal is essential to prevent an unexpected charge.
Note: The auto-removal at checkout applies only at the checkout step itself. If a customer navigates back to the cart, the gift item may still be present there. Auto-removal does not apply to gifts added through the Tiered Progress Bar — customers can remove those directly from the progress bar themselves.
Treat as Gift With Purchase (Checkout Offer Widgets)
Checkout offer (recommendation) widgets now include a Treat as Gift With Purchase setting in their Advanced Settings tab. When this setting is enabled, items added by that checkout offer widget are treated by the same GWP watcher as GWP items — meaning cart conditions are validated and the gift is automatically removed if those conditions are no longer met, exactly as it would be for a standard GWP widget.
This is useful for any Shopify Plus merchant using a checkout recommendation widget to deliver a GWP offer at checkout rather than a standard GWP widget.
To enable this setting:
Open the checkout offer widget you want to treat as a GWP widget.
Navigate to the widget's Advanced Settings tab.
Confirm that Enable Attribution Tracking is toggled on. The Treat as Gift With Purchase setting cannot be enabled without attribution tracking active.
Toggle Treat as Gift With Purchase to on.
Important: If you toggle Enable Attribution Tracking off after enabling Treat as Gift With Purchase, the Treat as Gift With Purchase setting will automatically turn off as well and cannot be re-enabled until attribution tracking is turned back on. These two settings are dependent on each other.
All requirements and limitations described in this section apply — Shopify Plus is required, at least one checkout widget must be active on the checkout page, and unsupported rule types (URL rules, order tag rules) will be skipped.
Treat as Gift With Purchase: Behavior once enabled
Once enabled, the checkout offer widget operates under the same GWP watcher validation as a standard Gift With Purchase Widget:
Datasource valid + Rebuy discount still applied to the gift → gift stays at checkout.
Datasource invalid (cart no longer qualifies, AI-recommended endpoint, or unsupported rule type) → gift is removed at checkout.
No Rebuy discount on the gift line (for example, a non-combinable code overrode the free status) → gift is removed at checkout to prevent the customer being charged full price.
Requirements and Limitations
The following requirements and limitations apply when using the Treat as Gift With Purchase setting:
Shopify Plus only. Checkout extension functionality is required for the GWP watcher to run, and checkout extensions are exclusive to Shopify Plus.
The set data source needs to return specific products in order for the GWP watcher to work. An AI recommended endpoint won't be valid and the GWP watcher will auto-remove the gift.
GWP watcher removal logic:
If there is any valid discount and the data source is valid, the gift will stay.
If the data source is invalid (cart subtotal no longer qualifies, etc.) OR there is no discount at all, the item is removed.
Unsupported rule types. Data source rules using URL conditions or order tag rules are not accessible within Shopify checkout extensions. When these rule types are present, validation is skipped rather than evaluated incorrectly.
Shopify Markets + fixed pricing edge case. When products use fixed market pricing, the GWP watcher can behave inconsistently for customers shopping in a non-default currency. See the edge case details below.
Edge Case: Shopify Markets + Fixed Pricing
When your store uses Shopify Markets with fixed market prices (rather than dynamic currency conversion), the GWP watcher may incorrectly remove gifts at checkout for customers shopping in a non-default currency. This happens because Shopify does not expose currency conversion rates at checkout, which causes the watcher's threshold calculations to use incorrect values.
❌ Problem Scenario (Different Currency + Fixed Pricing)
Setup: Shop default currency USD, GWP threshold $10 USD, customer switches to GBP, Shopify currency rate ~0.755 (converted threshold: £7.55)
Product A: USD price $8, GBP price £8 ⚠️ (fixed market pricing — not dynamically converted)
In Cart: GWP calculation uses
8 × (1 / 0.755) = $10.59→ threshold met → 🎁 GWP is addedAt Checkout: Watcher references checkout subtotal (fixed £8) → subtotal appears below threshold → GWP watcher removes the gift ❌
Workaround: If your store uses Shopify Markets with fixed pricing across multiple currencies, test your GWP threshold behavior in each currency where you have fixed prices. Consider setting thresholds that account for this discrepancy, or use dynamic (non-fixed) pricing where GWP promotions are active.
FAQs
What should I do if the GWP item flashes repeatedly when it is added to the cart?
This issue typically arises due to a rule configuration using "Product equals" instead of "contains any." Update the data source configuration to use "contains any" for stable functionality.
Why isn't the GWP being added to the cart?
Ensure that the GWP product is active, published, and properly configured in Shopify. Inactive or unpublished products will not be added to the cart.
Why doesn't the selectable GWP widget popup appear in the Smart Cart?
This may be due to the widget not being properly installed. Check the installation step in the widget settings to confirm the setup is complete.
Do I need to be on a Shopify Plus plan to use the GWP widget?
No, a Shopify Plus plan is NOT required, as you can use Shopify Functions directly within the Widget's settings to enable a product discount for the free gift. The Shopify Functions discounting feature in the Widget settings is now available to all Shopify plans.
Is it possible to automatically add a free product to cart after a customer has entered a discount code?
No, currently is it not possible to trigger a gift to be added based on a discount code being used.
Why are products not being removed from the cart after discounts are applied?
This is typically caused by not using the Storefront API. The deprecated discounting method doesn't automatically remove products from the cart when they no longer qualify for the discount (e.g., a free gift). To resolve this, enable the Storefront API for real-time discount validation and automatic cart adjustment
Can I use both the Tiered Progress Bar and Gift with Purchase widget together?
While technically possible, using both tools simultaneously for the same promotion can lead to conflicts such as duplicate gifts being added to a customer's cart. For best results, choose the tool that best aligns with your promotional strategy and disable the other for that specific promotion.
Are Subscription products supported for GWP?
At this time, Subscription products are not supported for GWP.
How do I setup a Selectable GWP widget?
The "Selectable Gift With Purchase" widget is not a standard Rebuy widget (it is a customized version of a Cart Cross-sell widget), therefore additional custom code is required to ensure proper functionality. Refer to our on guide on custom implementation for this widget type: Selectable Gift-With-Purchase Widgets
Why is my GWP widget that is set to return a BOGO offer continuously looping in my Smart Cart?
If the INPUT product is the same as the OUTPUT product for your GWP Data Source (for a Buy One, Get One promotion), your "IF" statement must use a "Product" -> "Contains Any" rule. Although this is a cart-based workflow, a product specific rule is required in this scenario.
Why is my GWP widget's Data Source INPUT product tag rule not working properly when adding the tagged product to cart?
If you wish to have the GWP widget triggered when a specific tagged product is added to cart, your Data Source rule's IF statement must use a "Contains Any" INPUT statement. Although this is a cart-based workflow, a product specific rule is required in this scenario.
Why is my GWP widget still providing the free gift after disabling it?
Once the GWP widget is disabled no new customers will receive any gifts from that widget. However there may be customers who already had a gift added to their cart prior to the widget being disabled. Those items will not be removed from their cart when the widget is disabled.
Example: Customer A correctly receives a GWP item at 12:00pm. The widget is disabled at 12:05pm. Customer B begins shopping at 12:07pm and would not receive any items from the widget. Customer A would keep the item they received unless they manually remove it. This means it is expected that you may see orders containing items from disabled widgets. It is from shoppers that already had the item prior to the widget being disabled and are completing their checkout. The orders are not from new customers continuing to access the disabled widget.
Why is my free gift being added to the cart but still charging the customer?
This typically occurs when the Shopify Functions setting in your widget is not properly toggled on. Navigate to your widget settings and ensure Shopify Functions is enabled to apply the discount automatically.
Why aren't my free gift eligibility rules working correctly?
Revisit your data source rules and ensure all cart conditions are properly set under each logical "OR" or "AND" statement. Adding a cart subtotal condition into every OR block often resolves conflicting setups that may prevent free gifts from being applied correctly.
I'm using a URL Contains rule in my GWP widget's Data Source, but the free gift disappears from the Smart Cart when I navigate to another page/URL on my storefront. How do I ensure the gift always remains in cart?
For this scenario, we recommend using an Advanced UTM rule by following the steps in following guide: URL/UTM Based Rules
Essentially, you will need to ensure there is a specific UTM that can be keyed off of for your particular GWP campaign. For example, if you use a URL Contains rule that starts with
utm_source=,utm_medium=,utm_campaign=,utm_content=it should work as expected, and the GWP won't disappear when the customer navigates away to a different page on the site.
Will the GWP validation logic run during checkout?
Yes, Rebuy's GWP validation logic can run during the Shopify checkout process to monitor cart conditions and automatically remove gifts if a customer no longer qualifies. This feature is available on Shopify Plus only and requires at least one active checkout widget on the checkout page. For full details on requirements, limitations, and how auto-removal works, see the GWP Validation at Checkout section above.
Can I use a checkout offer widget as a Gift With Purchase widget?
Yes. Checkout offer (recommendation) widgets include a Treat as Gift With Purchase setting in their Advanced Settings tab. When enabled, the GWP watcher validates that widget's items exactly as it would a standard GWP widget — removing the gift if cart conditions are no longer met. This requires Enable Attribution Tracking to be on and is available to all Shopify Plus merchants. See the Treat as Gift With Purchase section above for full setup steps.
Does Rebuy automatically remove GWP products at checkout when a discount code overrides their free status?
Yes. If an applied discount code causes a GWP item to lose its free status, Rebuy automatically removes that item from checkout to prevent the customer from being charged full price. This runs through the same GWP watcher logic and has the same Shopify Plus and checkout widget requirements. See the GWP Validation at Checkout section above for full details.
Want to learn more about Rebuy features? Book a demo with our team today!










