Note this contribution was developed on an MS1 build. But it should work fine on any other.
This contribution will put the referral URL on the order status page, so you know exactly how each sale was made!
Files to change:
Shouldn't take you more than 10 minutes to install - very simple!