diff --git a/src/js/components/Notifications.js b/src/js/components/Notifications.js index e13ca37c..52e9fdfc 100755 --- a/src/js/components/Notifications.js +++ b/src/js/components/Notifications.js @@ -28,7 +28,8 @@ export default class Notifications extends React.Component{
'+xhr_response.error.message+'
'; - } - } + // Log with Analytics + ReactGA.event({ + category: "Error", + action: message, + label: (description ? description : "No description"), + nonInteraction: true + }); - store.dispatch(uiActions.createNotification(message,'bad')); + store.dispatch(uiActions.createNotification( + message, + 'bad', + null, + null, + description + )); console.error(action.message, data); break; diff --git a/src/js/services/ui/actions.js b/src/js/services/ui/actions.js index 7c963240..24595fd7 100755 --- a/src/js/services/ui/actions.js +++ b/src/js/services/ui/actions.js @@ -128,7 +128,7 @@ export function createBrowserNotification(data){ } } -export function createNotification(content, type = 'default', key = null, title = null, sticky = false){ +export function createNotification(content, type = 'default', key = null, title = null, description = null, sticky = false){ if (!key){ key = helpers.generateGuid() } @@ -138,6 +138,7 @@ export function createNotification(content, type = 'default', key = null, title key: key, type: type, title: title, + description: description, content: content, sticky: sticky } diff --git a/src/js/services/ui/middleware.js b/src/js/services/ui/middleware.js index 703b23fd..8e8bc9c6 100755 --- a/src/js/services/ui/middleware.js +++ b/src/js/services/ui/middleware.js @@ -113,6 +113,7 @@ const UIMiddleware = (function(){ 'broadcast', (broadcast.key ? broadcast.key : null), (broadcast.title ? broadcast.title : null), + null, true )) }