Amazin' Affiliate Link Checker
This github repo contains the tool's codebase and is made public as an example of my work. You can use the tool without cloning this repo by visiting it at (URL coming soon).
Who this tool is for
This tool is intended for Amazon Associates ("affiliates") with established websites.
Why use this tool
For a variety of reasons, your site's Amazon.com product links may become outdated. When this happens, your visitors end up on 404 pages ("dog pages") instead of the product(s) you meant to show them. This tool helps you quickly locate those dead links.
How it works
This tool scans your article for Amazon product links. It extracts a product ID from each link and checks that the product ID is valid. This website does not store your credentials or anything about your site.
Interpreting your results
Unfortunately, not every product on Amazon is in the Amazon Product Advertising API. Valid links may be marked "invalid" by this tool if the product doesn't exist in the API. The tool also considers links to Amazon.com search results to be "invalid" even though they are perfectly acceptable to Amazon and your site's users. You should manually confirm any "invalid" results you get.
To run locally:
- Clone both this repo (the client) and the server repo
- Open a terminal window for each repo
- In server,
- In client,
cd amazin-app, then
yarn install, and finally
- In your browser go to
From the server repo:
nightwatch frontend.js runs integration tests. Requires client running (in another tab, navigate to client repo and use
Unit ("react snapshot") tests
From the client repo:
yarn test rebuilds snapshots and runs unit tests
yarn test-u runs unit tests on existing snapshots
- In the
yarn run buildto create a folder called
- Copy the contents of
build(ie: not the build folder but what's inside it)
- Go into the
- Open the
- Delete all of the files inside public
- Paste the contents of build into public
- Push this change to GitHub
git push heroku-amazin masterto push these changes to Heroku
heroku opento open the app
Troubleshooting: If the heroku repo isn't hooked up (403 when trying to push to heroku), follow these steps:
- In Terminal,
heroku loginand follow the steps to log in
- Still in Terminal, enter
heroku git:remote -a amazin-link-checker
- For clarity and to avoid confusion with other Heroku remotes, I renamed this one to heroku-amazin
git remote rename heroku heroku-amazin
- Now the push can be done with
git push heroku-amazin master
Want to make it better?
Make a pull request and I'll check it out!
I'm a Chicago-based web developer who thought it might be fun to automate the tedious process of hunting outdated Amazon links on my blog.