You’ll need Shopify Plus to use Shopify Scripts.
We’ll create a GWP in two steps:
1/ Creating a GWP upsell offer
To create an upsell offer, install the UpsellPlus app and create your first offer. https://apps.shopify.com/upsellpluscheckout
Choose the product you want to upsell and style the widget.
Then add the compare at price of $0 or 0%. This will make sure the price is displayed as $0.
2/ Creating a script that makes the offer free
We’ll use a script creator to do this. Go to https://jgodson.github.io/shopify-script-creator/ > Create new > Conditional Discount
For the Discounted Item Selector, select Product ID
Add the product ID of the product you’d like to offer as a GWP. Set the percentage discount to 100% and give it a message.
This guide covers how you can find the product ID: https://www.upsellplus.com/blog-post/how-to-create-a-line-item-script-to-discount-a-specific-item-on-shopify-plus
Generate the script and copy it to your clipboard:
Great, you’re almost there! Now go to the Shopify Script Editor App in your Shopify store under Apps:
Create a new Percentage off a product.
Give the script a title (ex: GWP). Paste the script you just copied. Test it on your online store to see if the discount applies. If all works well, you can Save and publish!
Congrats! You just created a GWP with Shopify Scripts and UpsellPlus.