Firebase Analytics Event Log Error

I use Firebase Analytics, and my application logs some events using this code:

Bundle bundle = new Bundle(); bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "SOME_ID") bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "SOME_TYPE"); mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle); 

And it seems to work most of the time. In logcat, I have something like this:

 Logging event (FE): select_content, Bundle[{_o=app, content_type=SOME_TYPE, item_id=SOME_ID}] 

But for some events I get

 Logging event (FE): select_content, Bundle[{_o=app, _ev=item_id, _err=4, content_type=SOME_TYPE}] 

_Err = 4 seems to be some kind of error code. What does it mean?

In this case, with an error, my item_id was a rather long string (20-30 characters). Perhaps there is a length limit on item_id ?

+9
source share
4 answers

According to the official documentation :

Parameter names can contain up to 40 characters, can contain only alphanumeric characters and underscores ("_"), and must begin with an alphabetic character. Parameter values ​​can contain up to 100 characters.

Thus, they have length restrictions for both the key and the value.

Key: up to 40 characters

Value: 100 characters

+24
source

You register an event with a parameter that exceeds the maximum value. Accompanied by a FA / Error log message with more detailed information that you might have missed.

Here is a list of Firebase Analytics error codes:
1 - Invalid Firebase project identifier.
2 - Event name is invalid (empty, too long, invalid characters).
3 - The name of the event parameter is invalid (empty, too long, invalid characters).
4 - The value of the event parameter is too large.
5 - An event has more than 25 parameters.
6 - Invalid username (empty, too long, invalid characters).
7 - The value of the user property is too large.
8 - An application instance logs over 500 unique event types.
9 - An application instance sets more than 25 unique user properties.
10 - The application instance exceeds the one-day conversion event limit.
13 - The name of the event is reserved. 14 - The name of the event parameter is reserved.
15 - username reserved.
11, 12, 16 - Internal error.

+5
source

Yes, they have a length limit on item_id. In my case, too, when I integrated it with my application, I got the same errors when my item_id was long.

+2
source
  • Get Updated Firebase Error Codes

    Link to this link. Click here.

0
source

All Articles