Jump to content

Recommended Posts

Hello

I want to start an affiliate programme for my online shopping website.

If some customer comes to my site from a link from that affiliate site, how can I come to know and differentiate that customer from a customer who has directly come to my site?

Should it be maintained in session? Or some php variable especially for tracking this?

 

 

Thanks in advance :)

Link to comment
https://forums.phpfreaks.com/topic/283393-starting-an-affiliate-programme/
Share on other sites

@OP, you'll need to provide your affiliates a unique URL that you'll be able to verify their status with.  I'm not entirely sure what the best method is - I've never had to deal with affiliates - but the idea is that your script will be on the lookout for a certain kind of request (likely something unique through GET to keep things easy for your affiliates) that it will be able to parse, then for the duration of that user's session they're tied to the affiliate.

As Kevin has stated you need to identify which affiliate the inbound link has come from. Give each affiliate a unique key, some md5 string will be fine. Every link that the affiliate uses must contain their key. You could have a page that the affiliates can login to to see what links they can use. So, for instance, if an affiliate wants to promote a book that you are selling on your website from their own website they may use http://www.x.com/book/php-for-dummies?aff_id=adre34rfdrehkj87654

 

When a user lands on your site you must always be looking for that parameter (aff_id). If it exists, verify it, store it in a session, and if that user registers or buys on your site you know that the customer has come from a link that the affiliate has published.

 

Affiliates will want to know what their sales are so you will need to create an affiliated members area for your website. You need to decide on commission thresholds, etc. You will also need to create a mechanism so you know how much and when to pay an affiliated member. If a customer buys something and then is issued a refund, the commission total for the affiliate may need to change. You need to decide all this in your business model.

Edited by neil.johnson
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.