It can be accomplished ...

There are several areas where the code would need customization ... but it can be done ...

How you regulate preventing fake URLs not that it would help anyone with anything would be up to you ...

Only when the create_account is processed does it have to be managed and handle updating your customers_referral ...

Or whatever field you want this to be ...

Capture the get on the hit from the link ... store to a session ... save prior to the session_destroy ... reset ... add to customers account ... make a report ...

Or, utilize the customers_referral field and have that hidden from the customer ...