Adding additional content and scripts
You may need to include content or scripts on your Thank you page. This is useful when you are tracking Return on Investment (ROI), using Google Ads or other conversion tracking codes and partner tracking systems.
This guide explains where to add scripts in the Recharge app and how to use variables in your scripts.
- This guide is applicable to merchants using the Recharge Checkout on Shopify or BigCommerce.
- If you're using the Shopify Checkout Integration, follow Shopify's guide to customize the order status page, as the checkout process is handled by Shopify.
- If you're using the BigCommerce Checkout Integration, you can add scripts directly on the BigCommerce thank you page. For more details, see Using Script Manager.
Before you start
- This guide discusses custom code and is not supported by Recharge as per the design and integration policy. If you require further assistance, please visit the Recharge Agency Partner Directory.
- If you are using the Shopify Checkout integration, follow Shopify's guide to customizing the order status page for similar steps.
Add a script
- Click Storefront in your merchant portal and select Checkout.
- Enter your scripts for the Thank you page in the Thank you page text box and click Save.
Track first-time page loads
You may want to track pixels based on the first time the checkout page is loaded. You will need to surround the code you include with the following if statement. This ensures that customers who are refreshing the page are not counted more than once.:
{% if first_time_load %}
[YOUR CODE HERE]
{% endif %}
first_time_load
if statement, append show_scripts=true
to the Thank you page on checkout URL to force the scripts to load.Use variables in your script
You can use variables in your Thank you page contents and scripts. Variables allow the output of dynamic content depending on the content of the orders or the attributes of a customer. For more information on which variables can be included, visit Using variables for notifications and scripts.