Using Database to update Amazon Affiliate tag across entire site
-
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="https://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
- The topic ‘Using Database to update Amazon Affiliate tag across entire site’ is closed to new replies.