I'm starting work on my affiliate project once again, after it's been on the back burner for some months.
My original code would use a small external js to parse product and referrer id in order to launch a popup window. While thinking about usability for js inhibited browsers and my ability to extend the code in the future, I'm now considering to change the way my affiliate links are generated. The actual end result would still be similar (I may want to use a modal window rather than a popup).
What if my external script would load the jQuery framework and the affiliate sites would use a specific class name for their links to my product pages? This would make things simpler to implement for them, and still enable visitors who have disabled js to visit my site. Compare:
<a href="#" onclick="myFunction('productid', 'affiliateid')">Buy this widget</a>
<a class="affiliate" href="http://www.example.com/productid/affiliateid">Buy this widget</a>
The main advantage is that natural links are preserved without having to duplicate the code. There may also be some link juice benefit, I would of course allow webmasters to nofollow these, but don't expect all of them to do so...
Am I making things too complicated?