I placed my Amazon affiliate link into a Button stack and now things look crazy.

0 votes
asked Mar 26, 2015 in Stacks by q2aadmin (2,995 points)

I have an affiliate link for my Amazon book. I wanted to put it into a nice Button to draw attention to it. But when I paste in the code, I get very strange results. Multiple buttons appear on the page and one of them has not title and doesn't go to the right place.

My affiliate link looks like this (codes changed for anonymity):

<a target="_blank" href="http://www.amazon.com/My-Great-Book/dp/90210/?
_encoding=UTF8&camp=1234&creative=5678&keywords=Great%20yes&
linkCode=ur2&qid=123456789&sr=8-3&tag=mygreat-20&linkId=SDFGHJKSDFGHJ
 <http://www.amazon.com/My-Great-Book/dp/90210/?_encoding=UTF8&camp=1234&creative=5678&keywords=Great%20yes&
linkCode=ur2&qid= 123456789&sr=8-3&tag=mygreat-20&linkId=
SDFGHJKSDFGHJ >">CLICK HERE!</a><img src="http://ir-na.amazon-adsystem.com/e/ir?
t=mygreat-20&l=ur2&o=1 <http://ir-na.amazon-adsystem.com/e/ir?t=mygreat-20&
l=ur2&o=1>" width="1" height="1" border="0" alt="" style="border:none
!important; margin:0px !important;" />

2 Answers

0 votes
answered Mar 26, 2015 by isaiah (14,025 points)
selected Mar 26, 2015 by q2aadmin
 
Best answer

Why this happened:
The Button stack has space for a title -- but that title itself should NOT be HTML code -- it should just be text, like "Click Here". if you put HTML code into the title it will interfere with the Button's own HTML code and... well... the results are exactly what you see on your page: strangeness.

What to do:
To use this code inside of Button stack you need to separate the URL part from the other parts.

  1. First, drag a new button stack onto your page.
  2. Edit the label of the button. Place just the text part there. In this case, "CLICK HERE!" (although you can make the title say anything you like -- just not HTML).
  3. Select just the URL part of the link and Copy it. It should be the part that starts just after: href=" right up to the text just before: ">CLICK HERE!

    In this case that's this bit:

    http://www.amazon.com/My-Great-Book/dp/90210/?
    _encoding=UTF8&camp=1234&creative=5678&keywords=Great%20yes&
    linkCode=ur2&qid=123456789&sr=8-3&tag=mygreat-20&linkId=SDFGHJKSDFGHJ
    http://www.amazon.com/My-Great-Book/dp/90210/?_encoding=UTF8&camp=1234&creative=5678&keywords=Great%20yes&
    linkCode=ur2&qid= 123456789&sr=8-3&tag=mygreat-20&linkId=
    SDFGHJKSDFGHJ >

  4. Select the button stack.

  5. Click the Set Link button in the info sidebar.
  6. Paste the URL into the URL field.
  7. Click OK.
commented Mar 26, 2015 by isaiah (14,025 points)
The HTML code also contained an odd bit at the end: an image tag.  Even though the image doesn't appear on the page, the image is there somewhere. I can't say why amazon has placed this image link here for certain, but mostly this is done to as a way of tracking how many people saw the affiliate link.
You should place this link into an HTML stack and put that stack near your button. It will not produce visible content.  In the example above the img tag you'd place into the HTML stack is:


<img src="http://ir-na.amazon-adsystem.com/e/ir?
t=mygreat-20&l=ur2&o=1 <http://ir-na.amazon-adsystem.com/e/ir?t=mygreat-20&
l=ur2&o=1>" width="1" height="1" border="0" alt="" style="border:none
!important; margin:0px !important;" />
0 votes
answered Mar 26, 2015 by isaiah (14,025 points)

A less nice, but also perfectly acceptable way to go would just be to use the HTML that amazon provided as-is. Paste the HTML directly into an HTML stack and place that on the page. It's super simple and sure to work because it's exactly what Amazon said to do.

...