There are primarily 2 ways for merchants to set up an affiliate program, one is to offer coupons that are assigned to the affiliates and can be spread out. When someone uses that coupon, the merchant knows it’s a referral by that affiliate. The other is to create dedicated links with the affiliate ID in it. So when someone clicks through the affiliate link, the merchant can identify the affiliate.
For the latter, it’s sometimes tricky to make sure that your visitors or readers do click through your affiliate link rather than visiting the merchant site directly. One can easily search for the official site by business name in Google. While it is impossible to have a bullet-proof solution that makes 100% of the readers you refer click through your referral link, you can do it as much as possible.
One approach is to hide the affiliate link by a redirection in PHP. A better approach, however, is to create a clickable form button that submits a cloaked post or get request to the merchant site, as used by my WiredTree coupon site:
<form method="get" action="http://www.example.com/affiliate.php?aff=123"> <button type="submit">Activate Coupon Code</button> </form>
This way, the visitors would feel compelled to click on the button because there’s something good for them AND it’s relatively harder to find the original URL. Better yet, use the cloaked affiliate URL of your own in the action attributes.
If you are posting affiliate links or coupons on your WordPress blog, try the DRP Coupon plugin, it’d also help cover up your affiliate link and force the visitor to click on the link to claim the discount.