我试图将GA的用户ID功能链接到我的iOS应用,但这似乎并没有起作用。从文档中,我启用了具有User ID功能的视图(配置文件)。然后,我设置userId字段。
我的代码: 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
但是,在分析仪表板中:
我似乎找不到一个可以看到用户ID的地方。
答案 0 :(得分:11)
您根本无法在Google Analytics中看到用户ID。它只是用于统一设备间的数据。要查看用户ID,请尝试添加也记录用户ID的自定义维度。然后,您将有权在界面中查看它。
有关adding custom dimensions to send user IDs to Google Analytics的更多详情。