Button OnClick to Affiliate Link: Yes or No?

Catamarca Web
  • CMS & No-code
  • Web Development
  • SEO & GEO
  • Entrepreneurship
Eager newcomer Level 3
Posts
5
Like
0
Since
2018
Automatically translated from Spanish
Author #1

Good afternoon community, I have a question here and I'd be interested to know what those with experience think. Can you place an Amazon affiliate link with a Button? Since with this method you couldn't add the rel="nofollow" tag.

The code would be something like this:

<button onclick="funcion('https://amazon.es....')"></button>

Would I have problems with Amazon? Is it considered a follow link this way? Thanks.

Automatically translated from Spanish

1 replies

  1. Julio Rodríguez
    • SEO & GEO
    • CMS & No-code
    • Hosting & Servers
    • Web Development
    • Off-topic
    Regular Level 8
    Posts
    93
    Like
    0
    Since
    2026
    Automatically translated from Spanish

    Hello!

    personally, what I usually do is add a class and an attribute to it.

    example:

    <button class="gotome" data-goto="http://www."></button>

    and then with javascript do the redirect

    what's more, I put the URL encrypted in creandolared, check it out

    <li class="islink" data-goto="aHR0cHM6Ly9jcmVhbmRvbGFyZWQuY29tL2ZhcS8=">F.A.Q</li>

    i even have it so that if data-target exists it opens in a new tab

    JS Code

     //JS Links
        $(document).on('click', '.islink', function() {
            let url = atob(jQuery(this).attr('data-goto'));
            if(jQuery(this).attr('data-target')) {
                window.open(url);
            } else {
                document.location = url;
            }
        });
    
    

    CSS Code

    .islink { cursor: pointer !Important; }

    Automatically translated from Spanish

Sign in to take part in the forum.

This reply will be hidden. It is kept and can be restored.

Reason
or with your email