Wingysam / Christmas-Community

Christmas lists for families
GNU Affero General Public License v3.0
212 stars 39 forks source link

resolve url shortened links/amazon affiliate #74

Open tzwaeaen opened 1 year ago

tzwaeaen commented 1 year ago

Hi :-)

  1. Would it be possible to get product data from url shortened links?
  2. Can you add an option to add your amazon affiliate tag for amazon links?
Wingysam commented 1 year ago
  1. It depends on the URL shortener used, which ones are you referring to?
  2. I don't think Amazon allows affiliate tags for small sites like a self-hosted instance of Christmas Community. You would have to reuse a tag from another affiliate site, which doesn't seem very legitimate.
tzwaeaen commented 1 year ago

I am hosting my own url shortener (YOURLS) and everything else on the same domain that I have an affiliate code for.

For 1. Amazon has short links as well like amzn.to

Wingysam commented 1 year ago

I should be able to add redirection support to get-product-data.

Re. affiliate code: That sounds like it probably doesn't violate Amazon's policy. What's the process for tagging a link? Do you just add a query parameter? If so, what's it called?

tzwaeaen commented 1 year ago

The parameter is tag=XXX

Wingysam commented 1 year ago

An environment variable that adds the tag param to all Amazon links should work. Are tags supported on smile links?

tzwaeaen commented 1 year ago

I don't think that smile and tag are working together.

Wingysam commented 1 year ago

Looks like smile is no longer a problem for this -- https://www.aboutamazon.com/news/company-news/amazon-closing-amazonsmile-to-focus-its-philanthropic-giving-to-programs-with-greater-impact