It's common to include scripts that track sales conversions on the order status page because it's the final page of checkout. However, customers who return to check their order status might count as a second sale in your analytics.
To prevent your analytics from counting customers more than once, you can add the first_time_accessed property around some or all of your additional scripts. To do this, use a Liquid if statement, and place any scripts that you only want to run once between {% if first_time_accessed %} and {% endif %} tags.
Steps:
From your Shopify admin, go to Settings > Checkout.
In the Order status page section, go to the Additional scripts text box.
Paste the following code into the Additional scripts box:
{%iffirst_time_accessed%}
// Conversion scripts you want to run only once
{%endif%}
// Scripts you want to run on every visit
If you want a script to run the first time that the order status page is accessed, then paste it between the {% if first_time_accessed %} and {% endif %} tags. If you want a script to run every time the order status page is accessed, then paste it below the {% endif %} tag.