0

This is how I am sending event to firebase analytics.
where will be value of "label" ??

public static void addFirebaseCustomTracker(String action, String category, String label) {
    Bundle params = new Bundle();
    params.putString("category", category);
    params.putString("label", label);

    FirebaseAnalytics firebaseAnalytics = StartApplication.getInstance().getFirebaseAnalytics();
    if (firebaseAnalytics != null) {
        firebaseAnalytics.logEvent(action.toLowerCase().replace(" ", "_"), params);
    }
}

Existing Event...
public static void addFirebaseTracker(String event, String content, String category, String label) {

    Bundle bundle = new Bundle();
    bundle.putString(FirebaseAnalytics.Param.ITEM_ID, content);
    bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, category);
    bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "string");
    bundle.putString(FirebaseAnalytics.Param.VALUE, label);

    FirebaseAnalytics firebaseAnalytics = StartApplication.getInstance().getFirebaseAnalytics();
    if (firebaseAnalytics != null) {
        firebaseAnalytics.logEvent(event.toLowerCase().replace(" ", "_"), bundle);
    }
}

but now where should I check
bundle.putString(FirebaseAnalytics.Param.VALUE, label);


I and not able to find value parameter

Lokesh Tiwari
  • 10,496
  • 3
  • 36
  • 45
  • See http://stackoverflow.com/questions/38125537/firebase-analytics-unable-to-view-the-values-that-are-passed-in-the-event and http://stackoverflow.com/questions/37357605/android-firebase-analytics-custom-events-reporting-in-console/37357836#37357836 and https://firebase.google.com/docs/analytics/android/events#log_events – Frank van Puffelen Jan 23 '17 at 11:50
  • Here's something that I don't think is covered in the referenced answer. Make sure the total length of your event name doesn't exceed 32 characters (pre-Firebase Analytics v8) or 40 characters (Firebase Analytics v8+). If that happens, the event will be ignored and instead an error event will be logged. – Dan Morenus Jan 31 '17 at 22:16

0 Answers0