Learn business growth with Google Analytics 4 › Forums › Google Analytics 4 › Inconsistent Format Displayed for Custom Dimension in GA4 › Reply To: Inconsistent Format Displayed for Custom Dimension in GA4
-
The issue you’re encountering with GA4, where long numbers are being displayed in an exponential format, likely stems from the way JavaScript handles large numbers. JavaScript uses floating-point arithmetic which is not suited for large integers and as a result, very large numbers often result in scientific notation when handled by JavaScript. This might be altering the format of your custom dimension.
A potential workaround may be to convert the numbers into strings before sending them to GA4. Alternatively, if you’re using these large numbers as unique identifiers, consider using a UUID (Universally Unique Identifier) generator that gives shorter string values.
However, please note that GA4 natively doesn’t support a 37 digit number as a distinct value. It officially supports a numeric value range of ‘±9.22*10^18’ for ‘event_bundle_sequence_id’ and ‘user_pseudo_id’. For ‘event_params’, the numbers’ limit is ‘±2^53’. This limit is set due to the floating-point double precision number limit in JavaScript.
You may want to re-consider the design of your event data structure and choose a more feasible way to represent your number.