Author Topic: Link Tracking not working with Amazon affiliate links. Help  (Read 5494 times)

gwill23

  • Posts: 50
    • View Profile
    • http://www.residualenterprises.com
Link Tracking not working with Amazon affiliate links. Help
« on: March 17, 2006, 03:03:14 pm »
I have upgraded to the latest version to make sure that wasn't the issue.

The story:

I want to send links in my email sending my readers to amazon to affiliate links.

Amazon provides me with the following link:

Quote
http://www.amazon.com/exec/obidos/redirect?link_code=ur2&tag=gwill23-20&camp=1789&creative=9325&path=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct%2F0609609491%2Fsr%3D8-1%2Fqid%3D1142376587%2Fref%3Dpd_bbs_1%3F%255Fencoding%3DUTF8


I enter it into the link tracking and test it and it works great.

I put the !link_xxx in an email and I get the following link in the email.
Quote
http://www.residualenterprises.com/mail/link.php?id=86eb3f9omm


when I click on this link or cut and paste it into a browser it takes me to the error page on amazon.  My other simpler links work just fine.

Example:

Quote
http://www.goodpoliticsradio.com


email gets:

Quote
http://www.residualenterprises.com/mail/link.php?id=86eb3f9gpr


This one works fine.

gwill23

  • Posts: 50
    • View Profile
    • http://www.residualenterprises.com
Link Tracking not working with Amazon affiliate links. Help
« Reply #1 on: March 18, 2006, 10:07:32 pm »
Any ideas on this?

Would someone test these links on their system to see if they get the same problem?

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Link Tracking not working with Amazon affiliate links. Help
« Reply #2 on: March 19, 2006, 06:45:38 am »
I'll test this ASAP for the next update which could come out later today.

Regards, DW
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

gwill23

  • Posts: 50
    • View Profile
    • http://www.residualenterprises.com
Link Tracking not working with Amazon affiliate links. Help
« Reply #3 on: March 19, 2006, 07:58:26 pm »
Found a workaround.  Plz look at it still though it is a pain to setup.

I set link tracking to go to my site and wrote a php script to autoforward to the links amazon provided me.

It works for now but it is slow.

For your testing purposes I have setup a test link in LM Pro that points directly to the amazon link.

Code: [Select]
[url]http://www.residualenterprises.com/mail/link.php?id=86eb3f9amtest[/url]

This should take you the the One Minute Millionaire page at amazon.  It doesn't :(.

Thanks for the help.

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Link Tracking not working with Amazon affiliate links. Help
« Reply #4 on: March 20, 2006, 03:11:30 pm »
It appears this was caused by the following lines in link.php:

Code: [Select]
 $http = urlencode($http);
   // fix : / ? & =
  $http = str_replace('%3A',':',$http);
  $http = str_replace('%2F','/',$http);
  $http = str_replace('%3F','?',$http);
  $http = str_replace('%3D','=',$http);
  $http = str_replace('%26','&',$http);

This translates all characters to be URL-friendly.  I put this in when I started allowing message codes to be entered into links.  The change prevents problems with data containing spaces, etc.  I think I'm going to have to have another look at it.

To disable the feature change
Code: [Select]
 $http = urlencode($http);
To
Code: [Select]
 // $http = urlencode($http);

or
Code: [Select]
 $http = urlencode($http);
   // fix : / ? & =
  $http = str_replace('%3A',':',$http);
  $http = str_replace('%2F','/',$http);
  $http = str_replace('%3F','?',$http);
  $http = str_replace('%3D','=',$http);
  $http = str_replace('%26','&',$http);

To
Code: [Select]
/* $http = urlencode($http);
   // fix : / ? & =
  $http = str_replace('%3A',':',$http);
  $http = str_replace('%2F','/',$http);
  $http = str_replace('%3F','?',$http);
  $http = str_replace('%3D','=',$http);
  $http = str_replace('%26','&',$http); */


I'm going to do this in the upcoming update until I figure out how to encode it properly and not break your link. :)

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting