There are several apps in the App Store that should do what you're looking for: https://apps.shopify.com/search/query?q=affiliate
By ID, either a url with their personal name, or sometype of identifier that when we review sales, we know who directed that person to the site.
I do think an affiliate app is best, but I saw some people using coupons for this? We just want each sales/affiliate to get credit for their sale so we can pay them commission. My thought was some customers would just go to the site directly and not even input anytype of coupon, code or name.