evollu / react-native-firebase-analytics

React native bridge for firebase analytics
MIT License
206 stars 54 forks source link

screen_view is reserved, but not in list of reserved names #55

Open scarlac opened 7 years ago

scarlac commented 7 years ago

This package includes a list of reserved event names which doesn't include "screen_view". So tracking events manually using logEvent("screen_view") will actually fail. I encountered this since setCurrentScreen(...) doesn't actually track anything and the automatic tracking doesn't work (likely because RN projects usually don't use native navigation components.

Fix is simply to add 1 line in lib/modules/analytics/index.js in the const ReservedEventNames array: 'screen_view'

Thanks