You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is to be backward compatible with how you used before with analytics.js(now are gtag.js). But yeah this can be optimised for new users who dosen't use the old way of custom dimensions or custom metrics.
I understand custom metrics and dimensions (that you might want to define them and send them), but I don't understand why you would want to create 200 dimensions and metrics that just have their own name as their value regardless of whether the implementation defines a custom_map or not.
It would be awesome, that if an entry is defined, it passes that on, but if not, that it doesn't add these 200 entries - at least in my use case.
I understand custom metrics and dimensions (that you might want to define them and send them), but I don't understand why you would want to create 200 dimensions and metrics that just have their own name as their value regardless of whether the implementation defines a custom_map or not.
It is because the library doesn't know what dimensions/metrics are used until the consumer send an event. and custom_map can only be set during initialisation so thats why they are pre set.
From version 1.4.0
I added an option now legacyDimensionMetric where you can switch off these extra mapping in custom_map.
ReactGA.initialize("your GA measurement id",{legacyDimensionMetric : false});
alternative you can now also override or extend part of react-ga4 implementation
Hi there, I am implementing this library but am curious why these lines exists:
react-ga4/src/ga4.js
Lines 473 to 488 in 0e2e3a6
It creates 10.5kb of JSON that is then sent, and yea, not sure why, or how to stop it from doing so.
Many thanks.
The text was updated successfully, but these errors were encountered: