How to add a script to checkout (for affiliate partner programme)?
I would add the script by implementing hook_commerce_checkout_complete in a custom module. You also have access to the order in the function.

function MYMODULE_commerce_checkout_complete($order) {
  drupal_add_js(
   'https://track.adcocktail.com/...',
    array('type' =&gt; 'external')
  );
}


You need to debug the variable $order to find the values you stated, [commerce-order:order-number] etc.