1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

enable recordDynamicEvent func to passed attribute arg

This commit is contained in:
Sosuke Suzuki
2017-10-21 18:18:02 +09:00
parent 59f0cc4f98
commit 35b9bf5d34

View File

@@ -44,10 +44,10 @@ function initAwsMobileAnalytics () {
})
}
function recordDynamicCustomEvent (type) {
function recordDynamicCustomEvent (type, options = {}) {
if (process.env.NODE_ENV !== 'production' || !ConfigManager.default.get().amaEnabled) return
try {
mobileAnalyticsClient.recordEvent(type)
mobileAnalyticsClient.recordEvent(type, options)
} catch (analyticsError) {
if (analyticsError instanceof ReferenceError) {
console.log(analyticsError.name + ': ' + analyticsError.message)