我有一个sumologic查询,它根据用户代理返回操作系统/浏览器。
我尝试调整此查询以区分移动设备/平板电脑/桌面。
当它来到Apple时非常容易,因为您可以非常轻松地从用户代理处获取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上获取平板电脑和手机?
谢谢
答案 0 :(得分:0)
您只需将订单更改为:
即可| if (agent matches "*Android*","Mobile",device) as device
| if (agent matches "*Android Tablet*","Tablet",device) as device