nativescript-plugin-firebase icon indicating copy to clipboard operation
nativescript-plugin-firebase copied to clipboard

Custom analytics events don't get reported

Open TheOnlyMatt opened this issue 7 years ago • 3 comments

I have installed and connected the plugin to my firebase account.

When the app is running, the custom events I have set don't appear in the firebase dashboard whereas the basic ones as "add_to_cart" are correctly updated (with a few hours delay). Here is my code :

public Event(key : string, value ? : any){
        firebase.analytics.logEvent({
            key: "add_to_cart",
            parameters: [ // optional
                {
                    key: "item_id",
                    value: "p7654"
                },
                {
                    key: "item_name",
                    value: "abc"
                }]
        }).then(
            function () {
                console.log("Firebase Analytics add to cart logged");
            }
        );

        if(value)
            firebase.analytics.logEvent({
                key: key,
                parameters: value
            }).then(
                function () {
                    console.log("Firebase Analytics " + key + " logged with " + value + " as value");
                }
            )
        else
            firebase.analytics.logEvent({
                key: key
            }).then(
                function () {
                    console.log("Firebase Analytics " + key + " logged");
                }
            )
    }

All the events are correctly logged, for example I can see the "Firebase Analytics " + key + " logged". There is no particular error.

I am wondering if spaces in my keys could be the cause, as I noticed that all the firebase basic keys have no spaces.

Or is there something specific missing in my code or in the dashboard config ?

Any help would be very welcome !

PS : I have been waiting for nearly two days for the events to show up

TheOnlyMatt avatar Feb 16 '18 08:02 TheOnlyMatt

Could you manage to fix this? I also have same problem.

muratcorlu avatar Sep 19 '18 14:09 muratcorlu

I'm also facing the same issue in nativescript angular

RajkumarRepo avatar Aug 26 '19 07:08 RajkumarRepo

any update on this?

paul-castro avatar Apr 21 '21 01:04 paul-castro