Nativescript-plugin-firebase: Custom analytics events don't get reported

Created on 16 Feb 2018  路  2Comments  路  Source: EddyVerbruggen/nativescript-plugin-firebase

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

Most helpful comment

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

All 2 comments

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

I'm also facing the same issue in nativescript angular

Was this page helpful?
0 / 5 - 0 ratings