Tracking assistance

I need a suggestion. I want to make a similar page to this -
What I mean is, that there is a specific coupon that forwards you to the said “deal”, similar webpages use these codes to track traffic, clicks… well basically everything they can. I have a domain, but I’m not sure how to start using things like coupons, trackers etc. From what should I start to create my own tracking/coupons that forward you to a specific site and show were and from the traffic comes from. I’m really new to this, so if the question is stupid and I missed a place here with tutorials of this kind, please refer me there. Thanks