Firebase Analytics, unable to view the values that are passed in the event

后端 未结 3 1961
生来不讨喜
生来不讨喜 2020-12-22 00:08

I am implementing Firebase Analytics in my app.

Everything works fine, I am getting the logged events in my Firebase console, but I am having trouble with the bundle

相关标签:
3条回答
  • 2020-12-22 00:13

    I faced same issue:

     //pass this code in any click event or anywhere.
     
     FirebaseAnalytics firebaseAnalytics = FirebaseAnalytics.getInstance(this);
     Bundle bundle = new Bundle();
     bundle.putString("Category",category);
     bundle.putString("Screen",Screen);
     firebaseAnalytics.logEvent("MyCustomEvent",bundle);
     
     

    Pass this command for track:

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

    not when your app is send event log you will see logs. Custom tag i used android studio's emulator. Geny motion set SDK path from Genymotion: settings-> ADB.

    Note: After 15-20 minutes open firebase console, see right side and select today. you will find your custome event.

    0 讨论(0)
  • 2020-12-22 00:24

    The VALUE parameter is meant to be numeric. See the documentation on it here.

    Of course, you can log any custom parameter you want with your event, but parameter reporting is only currently offered on a subset of suggested events. Alternatively, you can query your raw events, parameters and user properties if you link your app to BigQuery.

    0 讨论(0)
  • 2020-12-22 00:34

    Try this snippet code

    findViewById(R.id.tvOrderTitle).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String strClickLogs;
    
                Bundle params = new Bundle();
                params.putString("mobileno", logMobileno);
                params.putString("name", logName);
                params.putString("email", logEmail);
    
                strClickLogs = "Eventlogs_Generated";
    
                Log.e(TAG, strClickLogs);
                //Logs an app event.
                mFirebaseAnalytics.logEvent(strClickLogs, params);
            }
        });
    

    You can see genrated logs in verbose in Logcat as below format:

    V/FA-SVC: Logging event: origin=app,name=Eventlogs_Generated,params=Bundle[{mobileno=9876543210, firebase_event_origin(_o)=app, firebase_screen_class(_sc)=SupplierListActivity, firebase_screen_id(_si)=7001228486350086694, name=Ashish Tikarye, email=ashisht@set.com}]

    0 讨论(0)
提交回复
热议问题