Google Analytics(分析) - 将用户ID与我网站的帐户ID进行匹配 [英] Google Analytics - Match UserID with my site's account ID
问题描述
我的每个注册客户都有唯一的帐户ID (例如:代理号码:00173393)。我想检索此信息通过谷歌分析 ...这不是一个个人信息,只用于统计。
我实现了userID,但如何匹配userID和帐户ID?
是否可以为帐户ID号创建变量?
用户ID $ c $> c>以及?这样你就可以进行1比1的匹配:
ga('create','UA-XXXXX-Y' ,'auto',{
userId:accountId
});
请注意, User ID
是Google Analytics(分析)不会暴露。如果您想要检索它,则需要将其保存在
或 API
Each of my registered clients have an unique account ID (eg: agent n°: 00173393).
I want to retrieve this information through google analytics... It's not a personal information and for statistics use only.
I implemented userID, but how to match userID and the accounts IDs ?
Is it possible to create a variable for the account ID number ?
解决方案 Why don't you use the account ID
as User ID
as well? That way you would have a 1-to-1 match:
ga('create', 'UA-XXXXX-Y', 'auto', {
userId: accountId
});
Please note however that the User ID
is not exposed back by Google Analytics. If you want to retrieve it, you need to save it inside a custom dimension:
- Admin -> Property -> Custom Dimensions -> Create one with User scope
- Add custom dimension tracking to your code
For instance:
ga('create', 'UA-XXXXX-Y', 'auto', {
userId: accountId,
});
ga('set', 'cd1', accountId); // if it's custom dimension n1
ga('send', 'pageview');
Then you can retrieve the User ID
via the UI:
or the API
这篇关于Google Analytics(分析) - 将用户ID与我网站的帐户ID进行匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!