• ntel

    (@ntel)


    Hi everyone,

    I would like to update the Amazon affiliate tag, that is hardcoded everywhere on my site.

    For those not familiar, this tag or ID is given to webmasters by Amazon to tag links in order to get a commission. The tag always looks like “MYCODE-20”, where “MYCODE” is a word you choose. In my case, I would like to update all the hardcoded links on my site from essentially “OLDCODE-20” to “NEWCODE-20”, and it would be extremely time-consuming to do it manually.

    Exemple :
    <a href="http://www.amazon.com/gp/product/B01K4U4O9S/ref=as_li_tl?ie=UTF8&tag=OLDCODE-20">...</a>

    I though about going to PHPmyadmin, exporting my database in a .sql file, searching for “OLDCODE-20” everywhere and replace it by “NEWCODE-20”, then importing the new database.

    However, I’m hesitant to proceed as I’m kind of a newbie, and I know databases are very touchy elements. If anyone would be so kind as to point me in a direction or even let me know if what I intend would work or not, that would be super helpful.

    All the best to you guys,
    Ntel

    • This topic was modified 7 years ago by ntel.
    • This topic was modified 7 years ago by ntel.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    1. backup your database.

    2. install the plugin “better search and replace” Search for OLDCODE and replace with NEWCODE.

    3. delete “better search and replace”.

    4. Beer.

    Thread Starter ntel

    (@ntel)

    Dear Steve, that’s amazing, thanks a lot for your help.

    I will try that solution and report!

    Best to you and Happy Easter,
    Ntel

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using Database to update Amazon Affiliate tag across entire site’ is closed to new replies.