affiliate-linker
v2.2.1
Published
React component for taming jumpy elements!
Downloads
21
Readme
Amazon Affiliate Link Builder
Package for generating Amazon affiliate links easily.
Installation
npm i affiliate-linker;
Usage
Import package:
import AffiliateLinker from "affiliate-linker";
Init and set amazon associate Ids:
const AZ_ES = "your-amzid-spain";
const AZ_US = "your-amzid-us";
const AZ_GB = "your-amzid-uk";
const AZ_FR = "your-amzid-france";
const AZ_DE = "your-amzid-germany";
const AZ_IT = "your-amzid-italy";
const AZ_SE = "your-amzid-sweden";
const associateIds = { AZ_ES, AZ_US, AZ_GB, AZ_FR, AZ_DE, AZ_IT, AZ_SE };
AffiliateLinker.init(associateIds);
Get ad data (using the best amazon domain for your user):
const ASIN = "B005C9WDUO";
const adData = await AffiliateLinker.generateAffiliateLink(ASIN);