On 08/19/2002 06:01 PM, Andy wrote: > Hi there, > > I am wondering if following scenario would be possible: > > - Create a unique referer id to make sure that the visitior has been refered > by a particular person. (e.g. server.com?ref=20) > - The visitor enters the site and browses around, but the ref=20 should not > be stored inside the url, but in a coockie > - If the visitor signs up and there is a referer id assign the person who > refered it some points. > > The problem I see, is how to make sure that the refered id does not get lost > and in case the person comes back another day still be able to asign the > person who refered it the points. > > Has anybody a good suggestion on that?
Cookies and volatile referer id in URL are not a good idea because many of them will get lost in the process and the referer looses credits. That is why affiliate programs like those use by Barnes and Noble are worthless as they hardly return any credit to the referer. OTOH, referral tracking methods that pass the referer page by page like the one that Amazon uses are much more efficient because they survive bookmarking as the referer id is always in the URL and not in a cookie that may be discarded if the user only registers some other day going to the bookmarked pages. The problem of Amazon method of keeping the referer id in the URL is that all pages that the user goes in the site have to be dynamically generated so the links are personalized to always include the referer id. A better method that I use to keep track of referal, is to include the referer in the domain of the URL. That means instead of requiring that the site have a URL domain of the type, www.mydomain.com, you can have alias in the DNS and in the Web server configuration, so that refererid.referertype.mydomain.com shows the same pages as www.mydomain.com . This is very easy to achieve if you control your DNS and Web server configuration. Just make *.mydomain.com be an alias of www.mydomain.com . From then on, it is not important if the user registers right away or bookmarks the site to come back some other day. When he registers, just check GetEnv("HTTP_HOST") to see where he is coming. For instance, I have an initiative that is called friends of the PHP Classes site. If your login name in the site is bigfriend, you just need to tell other people to go to http://bigfriend.users.phpclasses.org/ . Any URL under that domain will do. Then I have things like easy to paste latest classes or latest reviews tables that the friends of the site can use in Javascript format or XML format. The URLs in those tables are ready to keep tracking your user id if you put them in a site of yours. Users that go to your site and use the links from those tables will tell the site that it was you that referred the user to the site and when he subscribes you are credited. With that information, the site stores in the database and every day recomputes the friends of the site top charts. http://www.phpclasses.org/browse.html/top/top.html#friends There are also easy ways to pass referer ids by e-mail. Just login the site and click on the Recommend this page link that shows at the top of most pages. For more details look at the page of the friends of the PHP Classes site: http://www.phpclasses.org/friends.html -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php