Affiliate Coding

Hey,



We would like to add a tracking code to the order completion page for a 3rd party affiliate program. I have got the code from the affiliate program but:


  1. Which is the best file to put it in.


  2. It needs to return the following data:

    a. Order Total

    b. Discount code used **if used

    c. Order number



    How can I reference these variables on the order completion page?



    Thanks,



    Andy.