Offering a 1-click post-purchase offer on the ReCharge thank you page is easy with Rebuy, and customers do not have to go through checkout again! 🎉
Wait! If you haven’t completed steps 1-3 on our getting started guide, do that first!
Step 1:
Go to Online Store > Recharge Thank You Page, and create a new widget.
Step 2:
Configure the data source.
Once you have finished configuring the widget and data source, you can save your settings, and move on to the final step -- adding the offer to the ReCharge thank you page.
Step 3: Install the Widget
Adding the widget is a simple copy/paste exercise. First navigate to your Shopify admin > Apps > Recurring Billing by ReCharge. Once logged in, You can navigate to Storefront > Checkout. Scroll down to the Thank You Page section and copy/paste the following code. Make sure to replace the following values:
If you follow the install instructions found in the widget settings, there should be no need to replace any values, the code there is set up for your store and the specific widget ID!
{{ widget-id }} with your onsite widget ID: 1023
<div data-rebuy-id="{{ widget-id }}"></div>
<script src="https://cdn.rebuyengine.com/onsite/js/rebuy.js?shop={{ your-store.myshopify.com }}" async></script>
The code snippet above will run every time the thank you page is accessed. If you do not want this behavior, and instead would like the customer to only have one opportunity to redeem the offer, you can wrap the script tag in the following liquid code:
{% if first_time_load %}
<div data-rebuy-id="{{ widget-id }}"></div>
<script src="https://cdn.rebuyengine.com/onsite/js/rebuy.js?shop={{ your-store.myshopify.com }}" async></script>
{% endif %}
The code block above will only output the post-purchase offer on the first time the page is loaded. If a customer navigates back to the page later, the offer will not be displayed.
Summary
Once you have configured your data source, created your widget, and installed it to your thank you page, your customers will begin to see the offer. When they redeem the offer, a second transaction is triggered in the background, and a second order is created for the add-on product.
Pro tip: If you'd like to test out the post-purchase offer before making it available to all of your customers, you can set the onsite widget to "preview mode" and click "Save". Once on the thank you page, append "?preview=true to the URL" and you'll be prompted with offer!