The attached patch adds an administrator setting for the referral goto path. This is the path the client gets redirected to after visiting a referral url. Useful if you want to take the user to some marketing page or something. The default path is user/register.

This is my first contribution, so let me know if you prefer it another way. I created against a HEAD checkout via:

cvs diff -up referral.module > referral.module_gotopath.patch

thanks

Comments

kbahey’s picture

Version: master » 6.x-1.x-dev
Status: Active » Fixed

This should be in 6.x-1.x-dev in a few minutes.

Thank you.

ryan_courtnage’s picture

Here's a little tidbit that someone may or may not find useful:

If you change the "Referral goto path" in the admin to an empty string, then you can dynamically set the goto path by adding a ?destination=mypath querystring to the referral links.

Someone visiting "referral/abc123?destination=landingpage/123" would be directed to "landingpage/123" after the referral module does it's tracking cookie magic.

kbahey’s picture

Can you please revise the README.txt to include this hint, so it does not get lost in the issues?

ryan_courtnage’s picture

StatusFileSize
new1.14 KB

attached

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

911’s picture

Component: Code » Code: referral

Glad to find this Post. I was searching for a solution to use user referral links to link on any site of the Website, so looks like it is possible.

But can you please tell me, what kind of redirekt is used?

For SEO reasons it should be an 301 redirect. Does user referral modul use 301 redirects?

ryan_courtnage’s picture

The patch calls drupal_goto without specifying the http response code.

http://api.drupal.org/api/function/drupal_goto/6

Default behavior is 302. If you feel this is a bug, please submit a new ticket.