JungHyun Kim
JungHyun Kim

Reputation: 58

How 'google analytics web' knows name of mobile device with javascript?

from google analytics page

Hi.

I'm tracking some mobile pages with google analytics. And I found an interesting thing that google knows which devices visited the pages.

How google analytics detects specific device name (model name like Samsung SHV-E250S) with javascript not only device type(iPhone, Android or Windows)?

Upvotes: 1

Views: 3325

Answers (3)

JungHyun Kim
JungHyun Kim

Reputation: 58

Self-answer

I found model name in userAgent like below.

Mozilla/5.0 (Linux; Android 4.1.2; SHV-E210S Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.92 Mobile Safari/537

Upvotes: 1

Lewis Buckley
Lewis Buckley

Reputation: 1612

There is an open source solution called WURFL which has a database of devices. If you were looking to replicate this system you could use a server side API that WURFL supports and query the user string which can return the make and model.

http://wurfl.sourceforge.net

Upvotes: 2

yshrsmz
yshrsmz

Reputation: 1179

From browser's UserAgent, we can achieve model number(such as iPhone OS 3_0, LG-L160L) of the device.
So from that data, google can assume what device is it.

Upvotes: 2

Related Questions