Affiliate links and referral codes should be flagged as 'spam' and removed. "Spam" is too-strong a word here, but embedding affiliate codes simply adds to much of a perverse incentive to contribute that we do not need here. Put them in your blog or put them in your 'about me' profile, but they are inappropriate for this type of public forum.
But let's cover the bigger issue here:
On Self Promotion > Astro Turfing > Spam
A progression of terms covering the same basic issue.
Posts that exist only to promote a product or website do not add to the Q&A goals of this website. The story you might tell yourself is that this post is useful; that the author posted out of their heart-felt desire to help this community. Sure: granted.
But the problem comes when there are thousands of people with their products and services; and all those people in their heart-of-hearts feel that their products are also useful to everyone here. See where that's going?
This is not a blog, this is not a discussion forum, and this is not a place for product announcements. Be careful, because communities frown on overt self-promotion — or at least you should.
Occasional Mentions, in Context, With Full Disclosure
Users contribute here for different reasons. If you're here with the desire to share and pass on your hard-earned knowledge… great! If some small percentage of those answers just happens to be about your product or website, so be it. However, you must disclose your affiliation in your answers.
But keep this huge caveat in mind — If more than the smallest percentage of your posts include a mention of your product or website, you're probably here for the wrong reasons. Any type of "astroturfing" promotion is not acceptable. It brings down the overall value of genuine recommendations for everyone on the site and the potential for abuse is simply too great.