findUserAgentInfo > Documentation

With this plugin you can get userAgent information : his browser and version

Question to use

You have can get the 3 option : browser name + browser version (major) , only browser name and only browser major version.

Only one question in each survey can be used for each option: the question code must use the global question code in the plugin settings.

Settings for findUserInfo plugin

The question must be a short text (S) question type or a List (radio) (L) . If you use a short text question : the answer is directly filled with the browser information.

If you need to use the answer in quota for example, you must use a single choice question type. If the browser information is not found and the question allow other : the other choice is set and the other text is the final browser information.

Browser name

For Browser name, we use Browser.php [1]from Chris Schuld, thanks to him.

Then the browser list to put in answers (answer text) are:

  • Amaya
  • Android
  • Bing Bot
  • BlackBerry
  • Chrome
  • Edge
  • Firebird
  • Firefox
  • Galeon
  • GoogleBot
  • iCab
  • IceCat
  • Iceweasel
  • Internet Explorer
  • iPad
  • iPhone
  • iPod
  • Konqueror
  • Lynx
  • Mozilla
  • MSN Bot
  • MSN Browser
  • NetPositive
  • Netscape Navigator
  • Nokia Browser
  • Nokia S60 OSS Browser
  • OmniWeb
  • Opera
  • Opera Mini
  • Phoenix
  • Pocket Internet Explorer
  • Safari
  • Shiretoko
  • Vivalidi
  • W3C Validator
  • WebTV
  • Yahoo! Slurp

Browser version

For browser version, we search for the upper number in the answer (answer text). Then if your answer text are

  • 6
  • 10
  • 11

Internet explorer 9 check the number 6 and FireFox 50 check 11. Netscape 4 is set of other if the question allow other.

Usage

If the plugin is activated in a survey, we first find the browser information and put it in a session variable. After we search for corresponding question and answers.

We use the same system than prefilling a survey using GET parameters then that don’t update an already started survey. The browser informations are only set when starting a new survey.

You can hide the questions, and use of this questions in quota [2] if you use Single choice question.

You have an example survey in the plugin directory, you can import and see some conditions in action according to browser name and version. You can test this survey on our demo website

P.S.

I use FireFox, not because it the best and most hackable, but because it’s a browser different by design.

Footnotes

[1In a previous version we use browscap who found a lot more of browser type, but really use more memory than we can allow;

[2Some LimeSurvey version disallow usage of hidden question in quota. Better to update to the last version of your branch.