How to define an Audience with Firebase Analytics?
Asked Answered
S

2

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

Stefaniastefanie answered 13/6, 2016 at 16:32 Comment(0)
S
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

Stefaniastefanie answered 21/6, 2016 at 13:27 Comment(1)
And it didn't help much to be honestStefaniastefanie
A
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.

Arras answered 13/6, 2016 at 22:20 Comment(7)
I have signed up more than 10 times with different attributes.. Neither of them is showing result...Stefaniastefanie
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?Arras
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?Stefaniastefanie
You should contact Firebase support so we can look into this more closely.Arras
I does that, waiting for their answer... Thanks anyways :)Stefaniastefanie
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.Isaiah
Yes, but there is more than 50 user... so It doesn't make senseStefaniastefanie
S
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

Stefaniastefanie answered 21/6, 2016 at 13:27 Comment(1)
And it didn't help much to be honestStefaniastefanie

© 2022 - 2024 — McMap. All rights reserved.