4 ms·
I'd say develop it yourself. It only took about a day in rails. - make a migration to add "referrer_id" to users table - put a before filter in application_c
by barmstrong 16y ago
I'd say develop it yourself.
It only took about a day in rails.
- make a migration to add "referrer_id" to users table
- put a before filter in application_controller to watch for a special param used in affiliate codes, if it exists store in session
- when new users sign up set their referrer_id out of the session if it exists
- whenever the "action" is taken by the user that triggers a referral commission, put this is pending transactions
- use a monthly cron job and paypal gem to send affiliate commission each month
That was the gist anyway.
- jarin 16y agoI built something exactly like this in Rails for a client, and it was cake. As long as your affiliate commissions aren't excessive (like the 70% commissions in the porn industry), you really don't have to worry too much about click fraud either.