自定义代码以设置用户代理的值(即操作系统)。

huangapple go评论73阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年4月13日 17:11:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/76003702.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定