Gotcha, sounds like you are on the right track.
Your next step would be to create the database on your server to store the referral information. In the simplest case, your database table would contain columns along the lines of "RefID", "RefCount", "JoinCount". When the referral link is initially visited, the visit would be added to "RefCount". After the visitor signs up, you would increment the "JoinCount". In the end, you would have a database containing the referrer IDs, the number of people referred to the signup, and the actual number of signups processed.
There are additional tracking features and checks you may wish to implement, but hopefully this gets you started
