I need to get Amazon product affiliate Url programatically without logging in to affiliate-program.amazon.com.
I know how to get it manually. Log into Associates Go to Product Linking -> Product Links
I want the same programatically just by using ASIN, access key, amazon secret key, and my associate tag.
Thanks in Advance.
You can use open-source libraries like Affiliate JS to automatically add the affiliation tags to links on your website.
<script data-aff="amazon.com, www.amazon.com : tag = MY-AMAZON-TAG" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/affiliate.js" async id="aff-js"></script>
Just simply replace MY-AMAZON-TAG
with the tag that you made in Amazon (that probably looks like my-tag-20
) and add the HTML right above the </head>
. If you want to affiliate your URLs manually, simply add ?tag=my-tag
to the end.
Before: https://www.amazon.com/dp/B0042TVKZY/
After: https://www.amazon.com/dp/B0042TVKZY/?tag=MY-AMAZON-TAG
Before: https://www.amazon.com/dp/B0042TVKZY/ref=longvndjks?nsjklasd=nkdnc
After: https://www.amazon.com/dp/B0042TVKZY/?tag=MY-AMAZON-TAG
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With