英文:
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.
我希望在调查结束时,如果受访者同意留下评论,我想将他们重定向到App Store(如果使用iOS)或Play Store(如果使用Android)。
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."
我在调查开始时添加了Meta Info问题,用于捕获操作系统。然后,我在我的Survey Flow中创建了一个分支,打算设置一个值,区分“iOS”和“非iOS”以便分别重定向。然而,我无法为User Agent设置值,因为“保留的嵌入数据字段不能具有自定义值”。
Does anyone know a workaround? I'd rather not have to directly ask respondents whether they're using mobile / desktop or iOS / Android...
有人知道解决方法吗?我宁愿不直接询问受访者是否使用移动设备/桌面或iOS/Android...
英文:
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...
答案1
得分: 0
用户代理嵌入数据字段会自动设置为浏览器的用户代理。元信息问题会解析用户代理以确定操作系统。在调查流程逻辑中,应使用来自元信息问题的操作系统,无需使用用户代理。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论