firebase-kotlin-sdk
firebase-kotlin-sdk copied to clipboard
Firebase Analytics logEvent with custom parameters map issues
Hi there! I'm using the Firebase Analytics from GitLive version 2.1.0 in a Kotlin with Compose Multiplatform - Kobweb project for a website.
I am trying to log the following event together with a map of custom parameters:
First attempt:
analytics.logEvent(
"landing_cta_click",
mapOf(
"home_variant" to "A",
"cta_variant" to "B"
)
)
Second attempt:
analytics.logEvent("landing_cta_click") {
param("home_variant" to "A")
param("cta_variant" to "B")
}
Checking the Firebase DebugView, in first attempt they are logged under the v5_1 name:
And for second attempt, they are logged under the internalMap_1 name:
I expected that the home_variant and cta_variant custom parameters would be added directly to the landing_cta_click event log in Firebase as individual parameters, rather than being added under these unexpected container names.
This is a critical issue for my project because it totally breaks the Google Analytics custom parameters tracking, as for example home_variant is not considered a logged parameter even if it is set as a custom dimension. It just appears as (not set), because instead v5_1 is registered as the actual parameter, with a plain text value set to {home_variant=B, cta_variant=A}.