nativescript-plugin-firebase
nativescript-plugin-firebase copied to clipboard
Custom analytics events don't get reported
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
Could you manage to fix this? I also have same problem.
I'm also facing the same issue in nativescript angular
any update on this?