Randomly assign visitors to different survey urls

Hello,

I am conducting an online survey with four different conditions. The online survey website generates a different url for each condition (same items but different text manipulations). What i would like is a redirect that would assign every visitor randomly to a condition, so that i have one url i could send to everybody. Participants click it, and get a 25% probability of getting redirected to surveysite.com/conditionx.

How do i do this? I found how to redirect:

Prepare to be redirected!

This page is a time delay redirect, please update your bookmarks to our new location!

But now about the random part, any ideas or suggestions?
Thank you so much in advance

I’m puzzling through your question. It sounds like all you need is a random selection from an array of strings. You can define the strings statically:

private var urls : String = ["www.curveyside.com/conditionw", "www.curveyside.com/conditionx", "www.curveyside.com/conditiony", "www.curveyside.com/conditionz"];

Or you can make them public and then use the Inspector to enter the strings:

public var urls : String[];

To select a random string, you would do:

var selected = urls[Random.Range(0, urls.Length)];

Then you can use selected in Application.OpenURL() to load the randomly selected web page.