相关疑难解决方法(0)

用户ID未显示在Google Analytics信息中心(iOS)中

我正在尝试将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]];    // …
Run Code Online (Sandbox Code Playgroud)

google-analytics ios

10
推荐指数
1
解决办法
4685
查看次数

标签 统计

google-analytics ×1

ios ×1