Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to define an Audience with Firebase Analytics?

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

like image 400
Jaythaking Avatar asked Jun 13 '16 16:06

Jaythaking


People also ask

How does Google Analytics determine audience size?

See Audiences dataSign in to Google Analytics. Navigate to your view. Open Reports. Select Audience > Audiences.


2 Answers

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.

like image 157
Steve Ganem Avatar answered Oct 24 '22 23:10

Steve Ganem


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

like image 36
Jaythaking Avatar answered Oct 24 '22 22:10

Jaythaking