I want to keep track of my app's Audience by separating them with a custom attribute. Every user have a list of permissions. I want to be able to separate them with this attribute when then login into my app.
Currently, all the user falls into the category "Alls Users" instead of their separate categories... I log in using CEO more than 10 times and I waited few days... Still, I only see the audience name 'All Users' increments instead of my custom 'CEO' audience.
Here's how I setup the attribute:
Note: In my example here, let's say the user role returned by getRole() is 'CEO'
In my LoginActivity.java
for (EntityRole mRole : new ArrayList<>(profile.getRoles())) {
mRole.setUser(profile);
GenericDAO.getInstance(EntityRole.class).addOrUpdate(mRole);
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.SIGN_UP_METHOD, mRole.getRole());
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.LOGIN, bundle);
}
Here is my setting in Firebase:
Here is the result: