peterdalle / randomizer

Redirects the user to a random URL from a list of URLs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Randomizer

Randomizer redirects the user (i.e., the web browser) to a random URL from a custom list of URLs.

Randomizer is built with the intent of randomization in a controlled experiment.

For now, there is only a HTML file with JavaScript. But more languages are hopefully supported later.

Example Usage

For example, create three Google Docs forms (or equivalent) and add their URLs to the list in the file. That's it!

The user is then automatically and randomly assigned to one of the URLs when the user visits this file. If the user decides to close and reopen the browser, the user is still redirected to the same URL since a cookie is saved in the web browser.

Contact

Please contact me at @peterdalle or peterdahlgren.com if you have any questions.

How do I edit Randomizer?

  1. Download or git clone.
  2. Edit the file randomize.html and edit the URLs at these lines:
 	// List of URLs (two or more) for the experimental treatment and control groups.
		var RedirectURLs = {
			"urls" : [
				{ "url" : "http://www.aftonbladet.se/" },
				{ "url" : "http://www.dn.se/" },
				{ "url" : "http://www.svd.se/" }
			]
		}

About

Redirects the user to a random URL from a list of URLs

License:GNU General Public License v3.0


Languages

Language:HTML 100.0%