User ID not displaying in Google Analytics dashboard (iOS)

此生再无相见时 提交于 2019-12-03 07:34:44

问题


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.

My code: 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.


回答1:


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.

More details on adding custom dimensions to send user IDs to Google Analytics.



来源:https://stackoverflow.com/questions/23635770/user-id-not-displaying-in-google-analytics-dashboard-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!