Discourse Affiliate

:discourse2: Summary Discourse Affiliate Allows the creation of Amazon affiliate links, and can help you monetize your Discourse forum. When users create links and other users click through those links and buy products from Amazon (or another supported affiliate), they earn referral fees.
:open_book: Install Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately.

Features

List of countries where the Amazon Associates program is operational

Amazon.co.uk Associates Program
Amazon Sign In

Amazon.de Associates Program
Amazon Sign In

Amazon.fr Associates Program
Amazon Sign In

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

Amazon.ca Associates Program
Amazon Sign In

Amazon.co.jp Associates Program
アソシエイト・セントラル

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

Amazon.in Associates Program
Amazon Sign In

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 at https://affiliate-program.amazon.com/

Configuration

This plugin strips out all referral links in posts and replaces them with your Amazon Associates ID or other supported affiliate ID.

:mega: This change will only affect new and future posts. To have the change affect all existing posts, you will need to do a full post rebake once you set your 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/

Will 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 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, affiliate amazon ca, enter your Associate ID depending on which country programs you have registered for.

Run Tests

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

CHANGELOG

TODO

Extras

35 лайков

Возможно ли добавить поддержку ссылок amzn.eu? :thinking:

Например:

https://amzn.eu/d/4c3852b

В настоящее время она перенаправляет на:

https://www.amazon.co.uk/dp/B0CXJ9GM3G?ref_=cm_sw_r_cso_cp_apin_dp_CDAMFS1FPQXBQEWSKWVE&starsLeft=1

Она должна преобразовываться примерно в такой вид:

https://www.amazon.com/dp/B0CXJ9GM3G/?tag=sams-shop

2 лайка

Недавно я установил этот плагин на наш сайт, и он отлично работает для новых постов, но выполнение команды rake posts:rebake не привело к обновлению ссылок на Amazon в исторических постах. Возможно, моя команда допускает какую-то распространённую ошибку? Меня удивляет то, что в выводе, полученном после запуска команды, упоминается другой плагин:

Plugin name is 'GroupInvitation', но имя директории плагина — 'group-invitation'
Rebaking post markdown for 'default'
414610 / 414610 (100.0%)e
414610 posts done!

Буду благодарен за любые дополнительные рекомендации.

1 лайк

Привет, тебе удалось заставить это работать?

При попытке установки возникает ошибка: файл about.json не найден или некорректен.

Как вы пытаетесь установить?

Обычно эта ошибка появляется, когда вы пытаетесь установить #плагин так же, как вы устанавливаете #тему или #компонент_темы. Вы следовали инструкциям в руководстве по установке, ссылка на которое приведена в первом сообщении?

1 лайк

Извините, моя ошибка! Спасибо!

2 лайка

Здравствуйте! Я использую плагин Discourse Affiliate и включил Amazon OneLink для моего реферального идентификатора XXXXXX-20. Поскольку OneLink автоматически перенаправляет пользователей в их локальные магазины Amazon, нужно ли мне вводить свой реферальный идентификатор только для affiliate amazon com (США) или мне нужно добавить его отдельно для каждой страны?

Спасибо за помощь!

Подробнее о OneLink
:backhand_index_pointing_down::backhand_index_pointing_down::backhand_index_pointing_down:
https://affiliate-program.amazon.com/resource-center/onelink-launch

:partying_face: Этот плагин теперь включен в ядро Discourse как часть Bundling more popular plugins with Discourse core. Если вы используете самохостинг и пользуетесь этим плагином, вам нужно удалить его из вашего app.yml перед следующим обновлением.

1 лайк

Можем ли мы добавить это в правила процессора?

rules["amzn.in"] = create_amazon_rule("in") if postfix == "in"

Прямая вставка ссылок в заголовок темы не добавляет код в созданную ссылку.