Thanks a lot Bryan. I think, now I am on the right track. Maxo
On Feb 25, 6:45 pm, Bryan Crossland <[email protected]> wrote: > On Fri, Feb 25, 2011 at 6:00 AM, Maxo <[email protected]> wrote: > > Because we are testing different ways to monetize the traffic and want > > to split them to send to multiple providers like (Valueclick, > > Rightmedia, etc...) After that we are gathering the information > > regarding the revenue per provider and doing analysis. After the > > analysis, we are amending our traffic redirection method to send the > > traffic to the provider with is paying the highest. > > You're taking the long way around to get to the front of the barn. By > looking at what each of these providers pays to you on a per click or per > referral basis will do half or more of the work for you. You don't need to > start redirecting traffic to figure out who is going to pay you more. You > need a calculator and a hypothetical number of users. > > If you're insisting on taking the long route then you can just place the > list of redirect domains into an array and randomly select one each time a > user comes to the site. Alternately you can keep track of what number user > has arrived by using an instance variable counter. The counter number > matches a position in the array that the domains are kept in. Each time the > counter increments it uses the domain for that position to redirect to. At > the end of the array, reset the counter. > > B. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

