5

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:

Firebase

Here is the result:

enter image description here

Jaythaking
  • 2,200
  • 4
  • 25
  • 67

2 Answers2

7

Bear in mind that audiences only begin accumulating members after you define them. So, after you define this audience, once at least 10 LOGIN events are logged with a sign_up_method which includes "CEO", you will see your results in Firebase Analytics. More on audiences in the Firebase Help Center.

Steve Ganem
  • 10,591
  • 2
  • 39
  • 32
  • I have signed up more than 10 times with different attributes.. Neither of them is showing result... – Jaythaking Jun 14 '16 at 15:28
  • 1
    can you be a little more specific? After creating the audience, did log > 10 LOGIN events with a sign_up_method containing "CEO"? And then did you wait a few hours for reports to update after logging those events? Finally, where are you checking for results? – Steve Ganem Jun 15 '16 at 01:00
  • Thanks for helping me, I did log more than 10 times, I also log more than 10 times using others role like 'ROLE_MOBILE_PLAN', and I waited more than a week for the result... Nothing is showing up in the audience page of Firebase (Last picture in the Thread)...I'm starting to wonder how the 'contains' work for the restriction attribute... Does it need a regex? – Jaythaking Jun 15 '16 at 14:06
  • You should contact Firebase support so we can look into this more closely. – Steve Ganem Jun 15 '16 at 21:59
  • I does that, waiting for their answer... Thanks anyways :) – Jaythaking Jun 17 '16 at 14:33
  • When you say you're logging more than 10 times, is this with the same app? In other words, are you just signing out and signing in again over and over on the same device? I believe the way Firebase Analytics works, that's still going to count as just having one person subscribed to that audience. – Todd Kerpelman Jun 20 '16 at 18:44
  • Yes, but there is more than 50 user... so It doesn't make sense – Jaythaking Jun 22 '16 at 14:05
1

I receive this from Firebase Support:

Hi,

Thanks for reaching out to the Firebase Support. Sorry we couldn't get back to you anytime sooner as we are experiencing a high inflow.

I can see your question on Stack overflow and conversion with a engineer. In order to proceed further with the investigation, I would like to know if you tried logging the events using the debug mode?

Use verbose debug output to confirm successful event logging or identify problems with setup. To enable verbose logging on each platform, follow these steps :

Android adb shell setprop log.tag.FA VERBOSE adb shell setprop log.tag.FA-SVC VERBOSE adb logcat -v time -s FA FA-SVC

iOS Pass this argument on launch in Xcode : -FIRAnalyticsDebugEnabled

In addition to this can you check to see if you have applied any filter applied from previous report. This can often cause a report to show no data if it doesn't have any users that meets the criteria. Make sure to clear any filters if you want to step back to a high-level overview.

Regards, Animish

Jaythaking
  • 2,200
  • 4
  • 25
  • 67