How to prevent AdWords from counting duplicate sales when using a Shopify store

Background

Shopify's 'Thank You Page' (the page paid customers are redirected to upon purchase) is sometimes shown to the customers more than once if they seek to review their order status. This can make AdWords count the sale more than once.

In order to prevent such duplication on AdWords measurement, you should place one more line of code on your Shopify's store.