Getting user info using Client ID

依然范特西╮ 提交于 2019-12-04 05:17:14

问题


I have inserted the analytics.js tracking script into my code, and now I am trying to get user data such as medium, source, etc. using javascript and putting them into variables. Is there a way I can do this using Client Id?


回答1:


I assume you mean getting the data in realtime for use in your website. That is not possible.

Client ID is not exposed in the interface by default, you'd need to use a custom dimension.

There is a processing delay, report data may only be reliable the next day.

While there is the (less reliable) data from the real time API (which at least contains medium and source information) it does not support custom dimension, so you could not use the client id as query key.

Also to retrieve data from the API you need to be authenticated, which the current users of your webpage is not. So you would need to set up some kind of serverside proxy that handles authentication for you.

Also there are API limits determining how many requests you can make in a given time frame. Even a small site would exhaust those requests pretty quickly.

So while in theory this sounds doable it is not actually feasible for any real-life purpose.



来源:https://stackoverflow.com/questions/43185969/getting-user-info-using-client-id

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!