Page 1 of 1

Invitation Rate

Posted: Sun Mar 22, 2009 12:35 pm
by phaedo5
I want to set up an action for a website user, but I want to be able to set a percentage of user participation.

For instance, let's say I want to have something happen to 20% of the users that come to my site, like a survey or something. I know how to set cookies back and forth, but I am lost as to how I could have this happen to a set percentage of users.

Any one able to help with that??

Re: Invitation Rate

Posted: Sun Mar 22, 2009 1:01 pm
by jayshields
There are many ways to do this. The simplest way I can think of is to have a number in a text file on your server be incremented everytime a user loads the page. Check that same number everytime a page is loaded too. The number % 5 will equal 0 for every fifth person that accesses your website. So you can trigger a survey or whatever.