I installed a helper class that reports events and screens Google Analyticsthrough EasyTrackerfor an unknown reason every time I restart the application, it reports all the screen and events as a new user. checked the file gaClientIdin which the unique ID.but is stored, every time I restart the application, the identifier stored in this file changes compared to other applications where it remains the same.
here is the code that I use in my helper class, note that I also tried using the ApplicationContext context. I tried disabling instant sending (and yes, I know this is not a good practice, reporting it immediately)
private static String mLastView = "";
public static void sendView(String view,Context ctx) {
if(view.equals(mLastView)) return;
mLastView = view;
EasyTracker.getInstance().setContext(ctx);
EasyTracker.getTracker().sendView(view);
EasyTracker.getInstance().dispatch();
}
public static void sendEvent(Context ctx,String category,String action,String label,long value){
EasyTracker.getInstance().setContext(ctx);
EasyTracker.getTracker().sendEvent(category, action, label, value);
EasyTracker.getInstance().dispatch();
}
Update:
GoogleAnalytics , . , - ( ?), , data/data/com.my.app/files/gaClientId
Update:
-, gaClientId , , , - ClientID .