http-redirectoperating-systemuser-agentqualtricscustom-code

Custom code to set a value for User Agent (i.e. operating system)


At the end of my survey I'd like to re-direct respondents to leave a review via the App Store (if using iOS) or Play Store (if using Android) - if they agree they'd like to leave one.

I added the Meta Info question at the start of the survey, which captures the operating system. Then, I created a branch in my Survey Flow with the intention to set a value for "iOS" vs. "not iOS" in order to re-direct separately. However, I cannot set a value to the User Agent because "Reserved Embedded Data fields cannot have custom values" See attached image.

Does anyone know a workaround? I'd rather not have to directly ask respondents whether they're using mobile / desktop or iOS / Android...


Solution

  • The UserAgent embedded data field is automatically set to the browser's user agent. The Meta Info question parses the user agent to determine the OS. You should be using the OS from the Meta Info question in your survey flow logic. You don't need to use UserAgent.