Forum Moderators: skibum

Message Too Old, No Replies

Ampersand in affiliate link

Will it interfere with the tracking?

         

traffik daddy

5:06 pm on Dec 11, 2003 (gmt 0)

10+ Year Member



Hi,

We use affiliate links in one of our newer sites and when we have come to validate it we have found that the W3 validator is picking up & in the link as an error. If we change this to & does anyone reckon it will intefere with the tracking code for our affiliate program?

Thanks
Terry

jdMorgan

5:33 pm on Dec 11, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There should be a "?" in the URL preceding the "&". If not, it is an invalid URL, since "?" is used to demarcate the URL-path from a query-string.

As an example, here's a link like the one you'd use to reply to this thread:

http://www.webmasterworld.com/edpost.cgi?action=reply&forum=20&discussion=1849

It has two ampersands, but they are set off from the actual URL by the "?action=" part.

Jim

Robert Thivierge

7:22 pm on Dec 11, 2003 (gmt 0)

10+ Year Member



Terry, if you change your HTML code from "&" to "&" the "target" website (and it's web server log) will just see the "&". The web client (browser) will convert "&" to "&" before making a request. Only somebody looking at your HTML source would know the difference. So your code will validate, and should not effect tracking software that's run on the "target" machine.

Jim, I bet Terry did use a "?" to start the "query" string. That's not the problem. The "&" after the "?" in your example is technically wrong. You should use "&". It's ok to use "&" when typing an address in a browser, but in your HTML document, you should use "&".

Example: this is in HTML referer site:
<a href="test.htm?param1=val1&amp;param2=val2">text</a>

This is in target site's web log (picked up by their tracking tool):
/test.htm?param1=val1&param2=val2

So, the target doesn't even know.

Take a look at the source code of this web site. It is done correctly with the "&amp;".

nativenewyorker

6:43 am on Dec 12, 2003 (gmt 0)

10+ Year Member



Robert Thivierge said:

So your code will validate, and should not effect tracking software.

The key word there is should.

Replacing & with &amp; with LinkShare affiliate links will work. Doing the same with Amazon affiliate links will cause them to mistrack. If you have a manageable number of Amazon type links that cannot be changed, you may want to point those links to an internal URL and redirect with .htaccess to the correct target URL. That way the page will validate.

The bottom line is to always test your new affiliate links to make sure they work. Do not assume that the links you copy from the merchant's website or from the merchant's email is correct. It is not uncommon to find coding errors in the linking codes from merchants.

Ted

traffik daddy

10:29 am on Dec 12, 2003 (gmt 0)

10+ Year Member



Yes,

We use Amazon, Affiliate-Window, UK Affiliates, Commission Junction and Trade Doubler. I'm based in the UK so I'm not sure if you guys will have any knowledge regarding UK Affiliates. I'm dropping Affiliate-Window as I think they are very unstable. Our best results have produced from Trade Doubler. I'm dropping Commission Junction too as I think they are aimed more at the US rather than the UK.

We're still doing trial &amp; error with this site but we still have a lot of coding errors to work on. I may try the redirect like you said to help with the validation. I just want to get the site as search engine friendly as possible but am struggling with these links.

Do you have any knowledge with Trade Doubler and whether this &amp; character will work in their links?

Thanks for your help anyway, muchas gracias ;)

Terry