Shortcode / Code to track orders on Order Confirmation page

Would it be possible (through the use of shortcodes/code) to output certain order variables such as order total, order id, etc. on the order confirmation page?

What I would like to do is to use my tracking script to track the sales, but using Order ID and Order Total as variables in the Javascript tracking code. This could also be handy for other external affiliate scripts, etc.