user3611168
user3611168

Reputation: 385

Firebase logEvent String length

I'm trying to using firebase, but when I want to logging the most visited url from user by using logEvent this show error. Here is the code:

Bundle bundle3 = new Bundle();
bundle3.putString(FirebaseAnalytics.Param.ITEM_ID,"browser_most_url_bookmarked");
bundle3.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "http://vozforums.com/forumdisplay.php?f=33");
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle3);

Logcat shows:

W/FA: Value is too long; discarded. Value kind, name, value length: param, content_type, 42

I can't understande why, can anyone help me?

Upvotes: 11

Views: 9776

Answers (1)

Chintan Soni
Chintan Soni

Reputation: 25267

Yea.. found the issue.

Your this line is causing this log:

bundle3.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "http://vozforums.com/forumdisplay.php?f=33");

They are talking about FirebaseAnalytics.Param class Your log is also informative. These are some points to focus on:

Value is too long: means you are passing somewhat large string than expected.

Value kind, name, value length: param, content_type, 42

means

Kind = Param
Name = content_type
Length = 42

From Documentation in few words:

Param names can be up to 40 characters long
Param values can be up to 100 characters long

But your value length is 42 which is larger than maximum supported length of Param value (i.e. 36)

Hence, you are getting that Log. Hope you are clear by now.

Upvotes: 19

Related Questions