获取独特的移动网络客户数量
我有一个针对移动设备优化的网站。我想统计每天或每小时有多少个设备访问我的网站等......JavaScript 中有没有一种方法可以让我获得有关该设备的一些唯一 ID?我可以获得该设备的电话号码吗?
坦克斯
I have a site optimized for mobile devices. I want to have a statistics of how many unique users from which device has accessed my site per day or per hour etc... is there a way in JavaScript that I can get some unique id about the device? can i get the phone number of the device?
tanx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果您想开发跟踪系统,那么您真正的问题是唯一的消费者识别。为此,您可以应用各种技术:
1) 使用 cookie 进行跟踪。如果设备或 wap 网关不支持 cookie,则使用 url 识别。
2) 使用 HTTP 侦听器来获取唯一 ID。这里有用 链接。
3)使用一些服务进行识别,一些聚合商和运营商有它。
如果您需要它进行统计,请使用一些分析系统。您可以使用谷歌分析,但使用服务器到服务器。因为许多移动设备没有良好的 javascript 支持。
If you want develop your tracking system, then your real problem is unique consumer identification. And for this you could apply various techniques:
1) Use a cookie for tracking. If device or wap gateways don´t support cookies, then use url-identification.
2) Use HTTP hearders for getting unique ID. Here useful links.
3) Use some service for identification, some aggregators and carriers have it.
If you need it for statistics, then use some analytics system. You can use google analytics, but using server to server. Because many mobile don´t have good javascript support.
我的理解是,您只能从用户那里收集这么多“唯一标识符”(假设您不给他们提供 cookie):
IP 地址
这可以通过代理进行欺骗,并且某些用户拥有动态 IP 地址,每次连接时都会发生变化。 (此外,我还听说过一些恐怖故事,有时 IP 地址会在对服务器的查询之间发生变化。)
用户代理
极其容易被欺骗。此外,如果同一用户切换浏览器,它也会发生变化。
另外据我所知,JavaScript 无法访问客户的电话号码,绝对没有他们的明确许可。感谢上帝。
My understanding is that there are only so many "unique identifiers" you can collect from a user (assuming you don't give them a cookie):
IP Address
This can be spoofed via proxies, and some users have dynamic IP addresses, which change every time they connect. (Also, I've heard horror stories where sometimes the IP address changes in between queries to your server.)
User Agent
Extremely easy to spoof. Also, it changes if the same user switches browsers.
Also as far as I know, there is no way for JavaScript to access the client's phone number, definitely not without their express permission. Thank god.
只需使用 Google Analytics - http://analytics.google.com/
Just use Google Analytics - http://analytics.google.com/
现在有一些以移动为中心的网络分析工具。
我认为 Percent Mobile 中最好的一个,他们提供了一项免费计划,商业用途有限,但商业计划的价格不是那么高,如果这对你很重要,那么这是值得的。
http://percentmobile.com/
其他流行的选项,虽然我没有亲自测试过:
http://bango.com/
编辑:另一个流行的:
http://www.flurry.com
There are a couple of mobile centered web analytics tools out there now.
The best one in my opinion in Percent Mobile, they offer a free plan that has limited comercial use, but the comercial plans are priced not so high, it's worth it if this is important to you.
http://percentmobile.com/
Other popular option although I haven't personally tested:
http://bango.com/
EDIT: Another popular one:
http://www.flurry.com