There is a guide on adding custom JS snippets to the "thank you for your order" page:
http://devs.x-cart.com/en/how-to_articles/how_to_add_google_adwords_conversion_tracking_code _to_thank_yo...rder_page.html
The guide is for X-Cart 5.2.x, but it should work in X-Cart 5.3.x too (after you convert the .tpl template to a .twig template with the help of the
online converter).