I'm trying to link GA's User ID feature to my iOS app, but this doesn't seem to be working. From the documentation, I enables a User ID capable view (profile). Then, I set the userId field.
我正在尝试将GA的用户ID功能链接到我的iOS应用程序,但这似乎不起作用。从文档中,我启用了具有User ID功能的视图(配置文件)。然后,我设置userId字段。
My code: AppDelegate.m
我的代码:AppDelegate.m
id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker];
// You only need to set User ID on a tracker once. By setting it on the tracker, the ID will be
// sent with all subsequent hits.
[tracker set:@"&uid"
value:@"userIDTest"];
// This hit will be sent with the User ID value and be visible in User-ID-enabled views (profiles).
[tracker send:[[GAIDictionaryBuilder createEventWithCategory:@"User Test" // Event category (required)
action:@"User Sign In" // Event action (required)
label:nil // Event label
value:nil] build]]; // Event value
However, in the analytics dashboard:
但是,在分析仪表板中:
I can't seem to find one place where I can see the user id.
我似乎找不到一个可以看到用户ID的地方。
1 个解决方案
#1
10
You cannot see the user id in Google Analytics at all. It's only there to unify data across devices. To view the user id, try adding a custom dimension which also records user id. Then you'll have access to view it in the interface.
您根本无法在Google Analytics中看到用户ID。它只用于统一设备间的数据。要查看用户ID,请尝试添加也记录用户ID的自定义维度。然后,您将有权在界面中查看它。
More details on adding custom dimensions to send user IDs to Google Analytics.
有关添加自定义维度以将用户ID发送到Google Analytics的详细信息。
#1
10
You cannot see the user id in Google Analytics at all. It's only there to unify data across devices. To view the user id, try adding a custom dimension which also records user id. Then you'll have access to view it in the interface.
您根本无法在Google Analytics中看到用户ID。它只用于统一设备间的数据。要查看用户ID,请尝试添加也记录用户ID的自定义维度。然后,您将有权在界面中查看它。
More details on adding custom dimensions to send user IDs to Google Analytics.
有关添加自定义维度以将用户ID发送到Google Analytics的详细信息。