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.
Start by going to the Admin view in your Google Analytics account. In the Property section, click on Tracking Info and then on User-ID. There you can enable User ID tracking.
A User-ID view is only available to Universal Analytics properties in which User-ID is enabled, and if User-ID is implemented correctly in your tracking code and you otherwise maintain a technical configuration that can support this feature. Learn more about the User ID and how to set up the User ID.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With