eclipsesource / tabris-plugin-firebase

A firebase plugin for Tabris.js
https://tabrisjs.com
BSD 3-Clause "New" or "Revised" License
6 stars 5 forks source link

Analytics - Event logged, but value missing #10

Closed natanraj closed 7 years ago

natanraj commented 7 years ago

Problem description

I am using this plugin. handy. But the event is logged, not the value that we are passing is not getting logged and unable to see them in the firebase console. Event alone is visible.

Expected behavior

Both event and event value should be shown in the firebase console.

Environment

Code snippet


var gAnalytics = {};
gAnalytics.logEvent = function(pageName, eventName, value){
firebase.Analytics.analyticsCollectionEnabled = true;
firebase.Analytics.screenName = pageName;
if (value){
  firebase.Analytics.logEvent(eventName,{text:'test me'} );
}

}
module.exports = gAnalytics;
mpost commented 7 years ago

Thanks for the report. Will look into the issue.

natanraj commented 7 years ago

@mpost Do we have any luck on this ?

mpost commented 7 years ago

@natanraj In fact we looked into it and found that it works as expected. We just included the plugin in a new project and it worked as advertised. maybe your value in your snippet is false?

natanraj commented 7 years ago

@mpost i too thought so. If it is false - then event wouldn't have been logged right. By the by i had a even used a console.log inside to ensure it reached there :-)

mpost commented 7 years ago

i have no idea really. Maybe you can enable the logging earlier in your app?

firebase.Analytics.analyticsCollectionEnabled = true;
natanraj commented 7 years ago

@mpost ; yes.. it is there in the same code snippet

natanraj commented 7 years ago

@mpost can you please give any 'non-example' code snippet you used..

mpost commented 7 years ago

At first we activate analytics collection:

firebase.Analytics.analyticsCollectionEnabled = true;

than we use it like

firebase.Analytics.screenName = 'name';

or

firebase.Analytics.logEvent('tutorial_complete');
natanraj commented 7 years ago

Closing this