Use conditions when creating an affiliate link to use a specific destination URL (or display particular HTML Code) when visitors are from a certain country:
Similary, target users that are visiting with a specific device (mobile, tablet or desktop):
Conditions are followed from top to bottom and it will use the value of the first match it finds. If no match is found, the default will be used.
Both the default or the condition value can be empty as well, to not use a link/code for those particular visitors.