Amazon link rewriting for affiliate codes

Hey people

want to dig up this thread!

@dean Does your plugin still work with latest discourse version?
@CamilleRoux What is the status of your plugin? Still alpha?

Iā€™ve not tried tbh, Iā€™m running a discourse forum now so Iā€™ll have a look when I get 5 minutes. Unless any of the classes have been renamed which it relies on then it should work fine. It doesnā€™t expand short urls though and never will.

My plugin was working, but it needs now to be converted to ES6 and I donā€™t know how to do it:
https://meta.discourse.org/t/discourse-affiliate-insert-affiliate-code-amazon-automatically-to-links/19585/4

Can someone help me on this? thanx :slight_smile:

Would it be possible for someone walk through how youā€™d clone the repository and edit the affililink plugin to change the affiliate code?

Also, is there an easy way to exclude the plugin from rewriting subdomains? I have some posts that point to help files on a subdomain (i.e., sellercentral.amazon.com) and the plugin breaks those links.

No need to clone it, just copy it to the customised css section with the admin site and change the values at the top to reflect your own codes.

1 Like

You could use a service like viglink, or skimlinks

They both have tens of thousands of merchants and will add links to sites that will pay out more. As far as I know, only viglink will also add links into text. For example if I type ā€œSamsung Galaxy s5ā€ it will add a link to a site with an affiliate link.


Disclaimer: I do not work for either of those services.


This could be nice for Discourse because in the settings you could add your ID, and Discourse could have their own affiliate link to the site from the settings panel for users to sign up. I might make a plugin for this at some point

I donā€™t know if posting your own affiliate link is allowed here but itā€™s pretty lousy behavior. You should be ashamed of yourself.

2 Likes

Removed. No monies for me :pensive:.

Donā€™t sweat it @geek is very sensitive about affiliate links :wink: he has been burned before.

1 Like

Iā€™m unsubscribing from this topic as Iā€™m too old and grumpy to be involved anymore. :smile:

5 Likes

Iā€™m happy to announce that weā€™re developping an official affiliate plugin for :discourse:

It only works for amazon right now but more will come later :wink:

14 Likes

Excellent @zogstrip. Is this cool to add to production now?

Of course, thereā€™s not much, but itā€™s production-ready :wink:

1 Like

Great! I use a lot of rewriting like this on our forum if you need any feedback.

2 Likes