(action, extraproperties)
| 140 | // Provides a uniform interface for collecting information from the homepage. |
| 141 | // Always provides the category Homepage and includes the user role. |
| 142 | homePageEvent (action, extraproperties) { |
| 143 | if (extraproperties == null) { extraproperties = {} } |
| 144 | const defaults = { |
| 145 | category: 'Homepage', |
| 146 | user: me.get('role') || (me.isAnonymous() && 'anonymous') || 'homeuser' |
| 147 | } |
| 148 | const properties = _.merge(defaults, extraproperties) |
| 149 | return (window.tracker != null ? window.tracker.trackEvent(action, properties) : undefined) |
| 150 | } |
| 151 | |
| 152 | onClickAnchor (e) { |
| 153 | let anchor, anchorText, properties |
no test coverage detected