medama-io / medama

Self-hostable, privacy-focused website analytics.
https://oss.medama.io
385 stars 8 forks source link

iPad User-Agent Detection #77

Open rolikeusch opened 3 months ago

rolikeusch commented 3 months ago

If i visit a website with my iPad the os is detected as macos and the device as desktop. Would be great if an iPad would correctly detected.

ayuhito commented 3 months ago

This actually might be very difficult to resolve. Since iPadOS 13, iPads return the exact same user-agent as a regular macOS device.

If you go to Settings -> Safari -> Request Desktop Website -> All websites. That option is enabled by default. If you disable it, then the user-agent of the device would show that it is an iPad again. I'll see if there is a more reliable method we can use to detect iPads without doing something invasive in terms of privacy, but it is not as easy as it seems.

rolikeusch commented 3 months ago

Oh I see that this is not an easy task or even possible if the user use Request Desktop Websitesettings.