Create affiliate links for a landing page.

I'd like to create a landing page for a launch of a product, so for marketing it, I'd like to generate affiliate links, where visitors can subscribe.

On subscribing, the visitor is redirected to page two, containing a unique referral link that she can share with friends and family.

Every friend or family that subscribes using this link adds to the points for the initial visitor. More the number of points, more the chances of winning.

I'd like for the Visitors to be able to monitor the number of points collected from their referral link too...

I found a github page on how a similar launch was done:

Any idea in how I can achieve this?