You may need to include content or scripts on your Thank You page – this is useful when you are tracking Return on Investment (ROI), use Adwords, or other conversation 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.
Before you start
This guide discusses custom code and is not supported by ReCharge as per our design policy. If you require further assistance, please visit the ReCharge Partner Directory.
Add a script
From your ReCharge Dashboard, navigate click the wrench icon and select Checkout. Enter your scripts for the Thank you page in the Additional content & scripts text box and click Save.
You can preview your script and confirm if your code is rendering properly by click Preview in the right corner of the text box.
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:
{% if first_time_load %}
[YOUR CODE HERE]
{% endif %}
This will ensure that customers who are simply refreshing the page are not counted more than once.
Use variables in your script
You can use variables within 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.