User ID not displaying in Google Analytics dashboa

2020-05-21 02:34发布

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:

enter image description here

I can't seem to find one place where I can see the user id.

1条回答
贪生不怕死
2楼-- · 2020-05-21 03:33

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.

查看更多
登录 后发表回答