Discourse Affiliate Plugin

Summary: The official Discourse Affiliate plugin can help you monetize your Discourse forum. When users create links and other users click through those links and buy products from Amazon, they earn referral fees.

:link: GitHub: https://github.com/discourse/discourse-affiliate/
:arrow_right: Install: Follow the plugin installation guide.

Features

List of countries where the Amazon Associates program is operational

Amazon.co.uk Associates Program
http://associates.amazon.co.uk/gp/associates/join/main.html

Amazon.de Associates Program
http://partnernet.amazon.de/gp/associates/join/main.html

Amazon.fr Associates Program
http://partenaires.amazon.fr/gp/associates/join/main.html

Amazon.it Associates Program
https://programma-affiliazione.amazon.it/

Amazon.ca Associates Program
http://associates.amazon.ca/gp/associates/join/

Amazon.co.jp Associates Program
http://affiliate.amazon.co.jp/gp/associates/join/main.html

Amazon.es Associates Program
https://afiliados.amazon.es/

Amazon.in Associates Program
https://affiliate-program.amazon.in/gp/associates/apply/main.html

Amazon.br Associates Program
https://associados.amazon.com.br/

Amazon.com.mx Associates Program
https://afiliados.amazon.com.mx/

Amazon.cn Associates Program
https://associates.amazon.cn/join

Sign up and read more about the Amazon Associates program here: https://affiliate-program.amazon.com/
This plugin also has support for the French site ldlc.com: https://affiliation.groupe-ldlc.com/affiliates/

Configuration

This plugin strips out all referral links in posts and replaces them with your Amazon Associates ID or ldlc.com Affiliate ID.

If you set the Site Setting affiliate amazon com to say sams-shop, when people link ANYTHING from amazon.com the plugin will auto append tag=sams-shop and strip out all the existing referral links.

So for example:
https://www.amazon.com/Dragon-Quest-Echoes-Elusive-Age-PlayStation/dp/B07BP3J6RG/ref=br_asw_pdt-5?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=&pf_rd_r=XFGPRSG0SVD5K3RKX5T3&pf_rd_t=36701&pf_rd_p=f8585743-c043-4665-80a7-0cc5fe97d596&pf_rd_i=desktop&th=1

Would be auto converted to:

https://www.amazon.com/Dragon-Quest-Echoes-Elusive-Age-PlayStation/dp/B07BP3J6RG/ref=br_asw_pdt-5?tag=sams-shop

Site Settings

affiliate enabled: Enable the Affiliate plugin.
If you change this, you must rebake all posts with: rake posts:rebake.

affiliate amazon ca: Your amazon.ca (Canada) Associates ID. The links will be transformed only for all amazon.com links using the value entered here.
affiliate amazon com: Your amazon.com (United States) Associates ID. The links will be transformed only for all amazon.ca links using the value entered here.

You will see many more settings such as affiliate amazon co jp, affiliate amazon com au, enter your Associate ID depending on which country’s program you have registered for.
.
.
.
affiliate ldlc com: Your ldlc.com Affiliate ID (without the #). The links will be transformed only for all ldlc.com links using the value entered here.

Run Tests

Run bundle exec rake plugin:spec["discourse-affiliate"]

CHANGELOG

TODO

Extras

20 Likes