I'm passing along some client-generated user properties into Firebase Analytics and encountered the following message in logcat:
W/FA: Value is too long; discarded. Value kind, name, value length: user property, comp0, 37 D/FA: Logging event (FE): error(_err), Bundle[{firebase_event_origin(_o)=auto, firebase_error_length(_el)=37, firebase_error_value(_ev)=comp0, firebase_error(_err)=7}]
I looked up error code 7 in the Firebase Analytics Error Codes page, and while it reveals that the code means "user property value is too long", it doesn't specify what the maximum length is.
What's the maximum length of user property values? Is there a maximum length for key names, too?
User properties are attributes you define to describe segments of your user base, such as language preference or geographic location. These can be used to define audiences for your app.
User properties are attributes that describe groups of your user base, such as their language preferences or geographic locations. You can use user properties to define audiences.
To find some user properties that you want to create, go to the data layer screen in your Tag Manager account to see what values you are tracking and find the ones you want to recreate in GA4. Or, on the User Properties page of your Analytics account, click Create first user property.
The documentation for FirebaseAnalytics.UserProperty reveals the answer:
UserProperty names can be up to 24 characters long, may only contain alphanumeric characters and underscores ("_"), and must start with an alphabetic character. UserProperty values can be up to 36 characters long.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With