Firebase plugin Log predefined events Cocos creator 2.0.7

Firebase plugin Log predefined events Cocos creator 2.0.7


If you log any event its considered as a custom event, but if i try to use predefined events from here

in the examples you use constants but in real code they wont work.
i want to log kEventLevelStart event with kParameterLevelName but calling throught the library returns undefined

writing the constant value directly level_start and level_name log the event as custom event.


It seems firebase updated the doc.

SDKBox use "kFIRParameterLevel = "level"; currently.

2019-02-11 11:28:20.034807+0800 hello_world-mobile[71060:46179915] [MC] Reading from private effective user settings.
JS: sdkbox.firebase.Analytics.Param
JS: level

use can use customEvent name, such as:

            const evt = {}
            evt[sdkbox.firebase.Analytics.Param.kFIRParameterItemID] = 'id123456';
            evt[sdkbox.firebase.Analytics.Param.kFIRParameterItemName] = 'name123456';
            evt[sdkbox.firebase.Analytics.Param.kFIRParameterItemCategory] = 'category123456';
            evt['customKey'] = 'custom value';
            sdkbox.firebase.Analytics.logEvent("customEvent", evt);


using custom events are not shown on firebase panel unless you activate big data, but you must pay for it. That is because i wanted to use Firebase events


U can define event name same as firebase’s name, it’s a string. Later I’ll update the constant .

#5 (1.8 KB)


now you can use it:

JS: add_payment_info