(Obsolete) Use Amazon OneLink to make affiliated links on global forums much easier

This guide is deprecated. OneLink is supposed to work without additional scripts now (I say ‘supposed to’ because for many months now it has failed to work for me and others as proven by the number of posts on the subject on a popular user forum)

Anyway, as such you no longer need this. Let’s hope they fix the non-script solution!!

Guys,

Challenge:

Here was my problem. I have a global forum and wanted to direct people to the right Amazon locale for my affiliate links. I ideally wanted one amazon link that serves all my clients globally within the supported list of territories. I originally had a cludge - one link for US, one for UK … for every darn product link I have …

Possible solutions:

  • the official discourse-affiliate plugin? Haven’t tried tbh
  • The new kid in town: Amazon’s OneLink available seemingly exclusively from the US affiliate domain website, but don’t let that put you off if you are from elsewhere …

Advantages of using OneLink:

  • To install, it’s only a necessary to add a Theme Component, which makes it nice and simple & low impact in that respect

Using OneLink on Discourse:

  • You need to add a Theme component for the OneLink script before the closing body tag in the /body section. Ignore the error due to the ‘&’ - if you change that to %26 it will break the script oddly. Something like:
    <!DOCTYPE html><div id="amzn-assoc-ad-blah-blah-code"></div><script async src="https://z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=blah-blah-code"></script>
  • Add that theme component to all your user selectable Themes
  • IMPORTANT: to prevent you breaking your affiliate agreement which bars you from using Amazon trademarks locally (except when sourced live from their servers), blacklist one-boxing for all amazon links using the setting onebox domains blacklist. The links will still work but will be less pretty obviously - however, you can replace them with official affiliate links.
  • Read the agreement thoroughly. Make the required disclaimers visible and obvious as per the agreement “As an Amazon Assoc …”
  • Also consider blacklisting the Amazon image url’s that are included in the affiliate links to prevent those images being uploaded locally - this may break terms of your Affiliate agreement. Use setting disabled image download domains

The link contains your ID & account keys, so please get the real code from the OneLink webpage.

Once done, anytime you click on an amazon link on your website, it should do two things:

  • register that it came via your affiliation
  • open a new tab on the clients browser in the locale of the last Amazon website they logged onto, hopefully their home shop.

Now you need to read the OneLink website and make sure you have registered for an ID at each of the supported locales and linked them to your US account.

I believe you still get ‘credited’ in each locale - Amazon is a bit unclear about this - I will update this guide once I’ve had more experience with it.

Limitations:

  • Clearly it only supports Amazon …
  • Doesn’t gross up your credits in one place, they still accrue to each region
  • Annoyingly it seems to leave the primary link (say US) open too, so you have go back from that to get back to your forum …
  • May not work for users with adblocking in place

Hope this helps!

Any questions or feedback on this guide welcome…

12 лайков

So just an update. After a little bit of experience and having my account closed once, I’ve done the following:

  • Amazon one-boxing remains blacklisted so as not to generate unauthorised trademarked images locally.
  • I’ve been very careful to make the required disclaimers visible and obvious as per the agreement “As an Amazon Assoc …”
  • I’ve also ‘blacklisted’ Amazon’s image sources to prevent local uploading of images from Amazon to prevent any rule transgression. This has the added benefit of saving you server space and leveraging their CDN presumably :slight_smile:

Added this to the guide above.

7 лайков

Привет, Роберт,

Сейчас мы работаем над Amazon OneLink и у нас есть к тебе несколько вопросов.
В1: Ты имеешь в виду, что нам нужно создать собственный компонент темы для OneLink? Можешь ли ты предоставить шаблон компонента темы?

В2: Мы получили ошибку «Ожидается именованная сущность. Получено ничего» от скрипта Amazon OneLink. Как исправить эту ошибку?

Мы перепробовали множество способов с Amazon OneLink, но сейчас он не работает. Ждём твоего ответа. Большое спасибо за твое время.

Жаль слышать, что у вас возникли трудности :slight_smile:

Да, и вы уже процитировали его выше — это всего лишь одна запись в /body, где нужно убедиться, что вы обновили id и InstanceId. Похоже, вы это уже сделали. Это настолько просто, что я даже не стал размещать это на GitHub. Однако …

Вы не скопировали пример точно. У вас отсутствует https:. Не уверен, что это проблема, но просто обращаю на это внимание. Попробуйте добавить его. В редакторе тем у меня появляются предупреждающие ошибки, но он всё равно работает — попробуйте их игнорировать (главное, чтобы вы могли сохранить).

Надеюсь, это поможет! :slight_smile:

1 лайк

Привет, Роберт,

Спасибо за ответ. Это очень помогло.

Вернёмся к первому вопросу. Я заменил «&» на «&%26», и в этом скрипте ошибок нет. Правильно ли это для компонента?

У меня ещё один вопрос. OneLink предназначен только для отслеживания международной рекламы при привязке к аккаунту США, но не для отображения рекламы на сайте, верно? Нам всё ещё нужно вручную вставлять баннеры и ссылки на продукты Amazon Advertising на наш сайт.

На самом деле, думаю, это может быть излишним, извините, возможно, я удалю это из исходного сообщения. Попробуйте использовать просто & — то есть не меняйте его.

Он предназначен для отслеживания в международном масштабе (отсюда и «one-link»). Не забудьте привязать свои международные аккаунты Amazon Affiliate на сайте AmazonAffiliate.com. Следуйте их руководству.

Да, при таком подходе это делается вручную, но вы можете автоматизировать процесс с помощью собственного JavaScript-кода. Экспериментируйте! Я использовал плагин Custom Layout и виджет HTML для ротации рекламы на боковой панели из заранее отобранного списка. Получите прямые ссылки через Site Strip на Amazon, войдя в систему со своим аккаунтом партнёра. Будьте осторожны: некоторые товары доступны не во всех регионах.

2 лайка

Понял. Большое спасибо за ваши советы. Я попробую это на своём сайте papasasa.com.

2 лайка