>> Return to Day Trip Media Home

Thursday, 17 April 2008

Easy Way To Change Editor Kit Javascript To Update It For The Ebay Partner Network

I set about updating my editor kit javascript snippets on one site today, ready for the end of the month switch off of the eBay affiliate programme at Commission Junction. Rather unhelpfully the documentation at the eBay Partners site simply suggests that the best way to update your tracking codes is to completely generate a new code at the Editor Kit.

That's all well and good if you've only used one or two of the things, but I must have 40 or 50 of them on different sites. I've got some sites with one on each page, each with unique searches and customisations. It's not going to be practical to try and do each one again. Luckily the code for the new javascript is 90% the same as the old CJ javascript. So, being a lazy type I sat down to figure out some nice and easy find and replaces, just to edit the parts of the code that need fixing.

If you're looking for a quick fix you can run these find and replaces on a site wide basis using something like Dreamweaver or Textpad, without them messing with the rest of the formatting, custom ids and search terms in the sniplet. Nice and quick and easy. I sat down and compared the new output with the old, and these are the changes that need to be made. They shouldn't interfere with other code on your site, but just have a think about what you got on there just in case there are similar terms.

These worked for the javascript for both the UK and the USA generated sniplets. I haven't looked at anything else as I don't have any others set up myself.

  1. Find: encode=ISO-8859-1
    Replace with: encode=UTF-8

    I'm not sure if this can be changed to suit your site, so I'm sticking with it for now.
  2. Find: &prvd=1
    Replace with: &prvd=9

    I think this is the number for parameter for the provider - where 1 was for Commission Junction.
  3. Find: &track=*******

    ******* is your old CJ PID number, a seven digit number that you entered when you set up the sniplet.

    Replace with: &toolid=10004&track=**********

    ********** is your new eBay partner campaign number - a 10 digit figure you get from your ebay partner control panel. Note the &toolid= parameter as well - this is completely new to the sniplet and luckily sits next to the tracking ID so you change them both in one go.

I did a quick search earlier and couldn't find this info on making these edits to the sniplet. Hopefully that will save a few people wading through the forms at the Editor Kit page at ebay. When you copy and paste to do your find and replaces, make sure you don't copy spaces at either end of the terms.

Posted by Dio Bach at 19:45

0 Comments:

Post a Comment

Links to this post:

Create a Link

>> Return to Day Trip Media Home