Custom Events ( Firebase Analytics )

4,727 views
Skip to first unread message

Evans Attafuah

unread,
Jun 8, 2016, 1:48:53 AM6/8/16
to Firebase Google Group
Hello,

Analytics take too long to show up in the console and secondly it doesn't look my user properties and with events it doesn't log the data in the bundle. this is how my bundle looks like 

Help Needed

Bundle bundle = new Bundle();
bundle.putBoolean(Param.TEXT_AUTO_DETECTION, data.getTextAutoDetection());

if (data.errors.size() > Config.ZERO_LENGTH) {
String[] convertToStringArray = new String[data.errors.size()];
bundle.putStringArray(Param.SIGN_UP_ERRORS, data.errors.toArray(convertToStringArray));
}

bundle.putLong(Param.VERIFICATION_CODE_DELAYS, data.getVerificationCodeSeconds());
bundle.putString(Analytics.Param.THEME_COLOR, data.getThemeColor());
firebaseAnalytics.setUserProperty(Analytics.Param.THEME_COLOR, data.getThemeColor());
bundle.putBoolean(Param.PROFILE_IMAGE_SKIP, data.getProfileImageSkipped());
bundle.putInt(Param.VERIFICATION_CODE_RESEND, data.getVerificationCodeResend());

firebaseAnalytics.logEvent(Param.SIGN_UP_FLOW, bundle);

Steve Ganem

unread,
Jun 8, 2016, 4:00:21 AM6/8/16
to Firebase Google Group
Hi Evans,

1. Currently, you should expect your events reports to update every few hours.  
2. In addition to calling setUserProperty, you also need to register the user property in the User Properties tab in Firebase Analytics in the Firebase console.
3. You are logging unsupported event parameter types (boolean, arrays).  You should log only numeric or string types for event parameters.

You mentioned user properties, but your code Also, only simple types are supported for parameters

Evans Attafuah

unread,
Jun 8, 2016, 5:45:24 PM6/8/16
to Firebase Google Group
Thanks for the reply. Your documentation doesn't specifically say we should log just strings and numbers. I will make changes. I was checking my adb logs for analytics and booleans are converted to 0 and 1s.

Anyway about the user property, are you saying I should create a new user property in the Console and log the same property in code. Am a little confused. 😞

Steve Ganem

unread,
Jun 8, 2016, 5:59:46 PM6/8/16
to Firebase Google Group
Responses below :


On Wednesday, June 8, 2016 at 2:45:24 PM UTC-7, Evans Attafuah wrote:
Thanks for the reply. Your documentation doesn't specifically say we should log just strings and numbers. I will make changes. I was checking my adb logs for analytics and booleans are converted to 0 and 1s.

The API docs for logEvent say  "Only String, long and double param types are supported".
 


Anyway about the user property, are you saying I should create a new user property in the Console and log the same property in code. Am a little confused. 😞

Yes, follow the directions on this page under the heading "Set user properties".
 

Evans Attafuah

unread,
Jun 9, 2016, 2:29:18 AM6/9/16
to Firebase Google Group
Thank you for this.

Regards.

--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/17v1TeX1KK8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/baec9f8c-dc7d-4d75-8788-9ae33e9b5303%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages