Skip to content

Firebase Analytics logEvent with custom parameters map issues #691

Open
@andreimesina

Description

@andreimesina

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:
Screenshot 2025-01-03 at 14 08 08
Screenshot 2025-01-03 at 14 08 35

And for second attempt, they are logged under the internalMap_1 name:
Screenshot 2025-01-03 at 14 52 30
Screenshot 2025-01-03 at 14 41 38

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}.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions