简体   繁体   中英

Can I get information about user's geolocation using javascript and google-analytics?

像标题一样,我想从我现有的Google Analytics(分析)摘要中收集有关用户地理位置的信息,否则我将不得不使用一些额外的js库来处理它。

You have to use an extra library.

Google resolves user location on the server, so you cannot get it from the client side tracking code. And retrieving it via the API fails for a number of reasons, to start with that this would work only after the first hit and that it would be more work than using a specialized service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM