To add to @kevin1 's great feedback in this thread, I suggest you take a look at the interview we did with Data Science a few months ago. We spoke about some of the challenges we are working on improving with some details and some great visual examples. I hope it helps to (partially) demystify the device detection process.