This would take quite a bit of additional coding to accomplish. You would have to create a system where it passes a url paramter or other variable to the site and you keep track of whether the user was referred to your site by an affiliate or through another means.
There are a lot of users on this site that may be able to help you with this, or you can hire someone to set this up for you by posting in the job board forum.