我试图将GA的用户ID功能链接到我的iOS应用,但这似乎不起作用。从文档中,我启用了支持用户ID的视图(配置文件)。然后,我设置了userId字段。用户ID在Google Analytics仪表板(iOS)中不显示
我的代码: 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 。
[在Google Analytics(分析)中设置用户ID](https://support.google.com/analytics/answer/3123666) –
如果Google发现您的分析数据中包含用户名,他们将删除整个帐户和所有的数据。请参阅使用条款的第7部分。 – TombMedia