[firebase-analytics] number parameters not sent #6433
-
Hi, I have been using Google/Firebase Analytics for some time and properly receiving my events with the string values, but when I try to use "number" values it's always kind of bugged, 0 or null valued. const analytics = useAnalytics();
logEvent(analytics, "drawer_tab", {
current_drawer_tab: drawerSelection,
new_drawer_tab: value,
role: role,
product_id: productData?.id || "",
elapsed_time: drawerTabTimer.elapsedTime, // Here elapsedTime is always a float
});
console.log("drawerTabTimer.elapsedTime", drawerTabTimer.elapsedTime); // always shows correct float value In Google Analytics, I can't ever see values, even though I have some string values in BigQuery afterward. I use the Google Cloud BigQuery integration SELECT
event_date,
event_timestamp,
event_params
FROM `foo.bar.events_intraday_*`
WHERE
_table_suffix BETWEEN "20220700" AND "20220715"
ORDER BY event_timestamp DESC Is there an issue with Analytics not dealing well with number/float or something like that? Or should I even cast numbers to string? Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The Firebase Analytics web SDK is a wrapper around gtag.js that passes the params directly to gtag with no additional formatting, and according to the gtag documentation, numbers are fine. https://developers.google.com/analytics/devguides/collection/gtagjs/events It looks like from the documentation that if you want it to show up as the "event value" in the analytics dashboard you have to make the key literally |
Beta Was this translation helpful? Give feedback.
-
In the end, I just waited a few more days and I got the double value now |
Beta Was this translation helpful? Give feedback.
In the end, I just waited a few more days and I got the double value now