minimumrage Posted February 13, 2007 Share Posted February 13, 2007 We plan on setting up a referral program, and giving away prizes for whoever signs up the most new users to the site. The problem is, I'm not quite sure how to do this. I have searched and checked Google, but everything seems to be geared towards affiliate marketing. We just want to be able to track if "User A" sends an email to "User B" telling them they should join the site, when "User B" clicks the link and signs up, "User A" is credited with the new sign up. What would I need to do to integrate this into my site (written of course in PHP)? Or is there an existing script that I've overlooked? Thanks for any suggestions. Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted February 13, 2007 Share Posted February 13, 2007 Make sure that each user has a unique identifier and give them a link such as: http://www.domain.com/referral.php?id=unique_identifier to give to others. When someone visits the referral.php script, pop the id into the $_SESSION array and redirect to the home page. Then on site registration, check if the referral ID has been set in $_SESSION. If it has, you can credit the referrals properly. Quote Link to comment Share on other sites More sharing options...
minimumrage Posted February 13, 2007 Author Share Posted February 13, 2007 I guess I should preface this by saying my knowledge of PHP is limited. How do I do that? Is there a script that will automatically assign the ID's and display them for people to copy/paste into their emails? Also, do they have to be tracked manually? Sorry for my noobiness. Quote Link to comment Share on other sites More sharing options...
minimumrage Posted February 13, 2007 Author Share Posted February 13, 2007 Also, I should add that I already have it set up to "invite a friend" which then dispatches an email with a link back to the sign up page. The problem is I have no way of tracking who referred who. Thanks again. Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 13, 2007 Share Posted February 13, 2007 When it sends the link, have it also send their userID, so it's like http://mysite.com/ref=1234 Then when they sign up check if(isset($_GET['ref'])){ $ref = $_GET['ref']; } Then you know the user's id who referred them. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.