(action, extraProperties)
| 190 | // Provides a uniform interface for collecting information from the homepage. |
| 191 | // Always provides the category Homepage and includes the user role. |
| 192 | homePageEvent (action, extraProperties) { |
| 193 | if (extraProperties == null) { extraProperties = {} } |
| 194 | action = action || 'unknown' |
| 195 | const defaults = { |
| 196 | category: isCoco() ? 'Homepage' : 'Home', |
| 197 | user: me.get('role') || (me.isAnonymous() && 'anonymous') || 'homeuser' |
| 198 | } |
| 199 | const properties = _.merge(defaults, extraProperties) |
| 200 | return (window.tracker != null ? window.tracker.trackEvent(action, properties) : undefined) |
| 201 | } |
| 202 | |
| 203 | onClickAnchor (e) { |
| 204 | let anchor, properties, translationKey |
no test coverage detected