简体   繁体   中英

How to track app by user id : Google Analytics

I am new to Google Analytics. I want to track my application by unique user id. I am using Google Analytics SDK for Android v3 . I have this code on onStart() .I read about user id and created a new view for user tracking.

Tracker tracker = GoogleAnalytics.getInstance(this).getTracker("UA-xxx-2");
tracker.set(Fields.SCREEN_NAME, "Main Acitivty");
tracker.set("&uid", id);
tracker.send(MapBuilder.createAppView().build());

But I am not getting how can I get this uid in my Google Analytics Console, I am trying to track user by their user_id , so I can get complete report of particular user. I am able to get count of the total active user , screens and hit events. But I didn't get any success on getting the same report user-wise. I also tried to create custom dimension and metrics but those are also not reflecting on account.I have no idea Where can I check this field.

For custom variables :

  easyTracker.send(MapBuilder
         .createAppView()
         .set(Fields.customDimension(1), "premiumUser")
        .build()
         );

I have searched , but I didn't find any good tutorial on this.

Any help, suggestion , reference link would be greatly appreciated. Thanks.

User Id is only used internally to make sure that the sessions from one user are tracked together - it just makes your stats more accurate, and enables cross device analytics.

You cannot acces the userId though:

User ID - Feature Reference

Limits

The User ID value can not be queried as a dimension in reports in either the web interface or the APIs

Also be sure not to send any user id like name or email:

User ID Policy

You will not upload any data that allows Google to personally identify an individual (such as certain names, social security numbers, email addresses, or any similar data)

You can find User ID Converage under Behaviour in the Audience section

check this image:

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM