使用客户端ID获取用户信息 [英] Getting user info using Client ID

查看:93
本文介绍了使用客户端ID获取用户信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将analytics.js跟踪脚本插入到我的代码中,现在我正在尝试使用javascript并将它们放入变量中来获取用户数据,如媒体,源等。有没有一种方法可以使用客户端ID来做到这一点?

解决方案

我假设你的意思是让数据实时用于你的网站。这是不可能的。



默认情况下,界面中未显示客户端ID,您需要使用自定义维度。



有一个处理延迟,报告数据可能只有第二天才可靠。



尽管实时API有(不太可靠的)数据(至少包含中等和源信息)它不支持自定义维度,所以你不能使用客户端ID作为查询键。



另外要从API中检索数据,您需要经过身份验证,您的网页的当前用户不是。因此,您需要设置一些服务器端代理来处理您的身份验证。



另外还有API限制,用于确定在给定时间段内可以创建多少个请求。即使是一个小网站也会很快耗尽这些请求。

因此,尽管在理论上这听起来可行,但它对于任何真实生活目的来说都是不可行的。


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?

解决方案

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.

这篇关于使用客户端ID获取用户信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆