我有一个sumologic查询,它根据用户代理返回操作系统/浏览器。
我试着调整这个查询来区分移动设备/平板电脑/台式机。
对于苹果来说,这很容易,因为你可以很容易地从用户代理那里获得iPad / iPhone。
现在,对于Android,我解决不了这个问题。
如果我使用匹配:
| if (agent matches "*Android Tablet*","Tablet",device) as device 看起来我会得到平板电脑(在Android上运行)。
但是,如果我添加这一行:
| if (agent matches "*Android*","Mobile",device) as device 它会帮我弄到手机和平板电脑。
有没有办法改变这一点:
| if (agent matches "*Android Tablet*","Tablet",device) as device
| if (agent matches "*Android*","Mobile",device) as device 在Android上安装平板电脑和移动设备?
谢谢
发布于 2015-12-30 15:03:03
您可以简单地将顺序更改为:
| if (agent matches "*Android*","Mobile",device) as device
| if (agent matches "*Android Tablet*","Tablet",device) as device https://stackoverflow.com/questions/32395113
复制相似问题