(e)
| 150 | } |
| 151 | |
| 152 | onClickAnchor (e) { |
| 153 | let anchor, anchorText, properties |
| 154 | if (!(anchor = e != null ? e.currentTarget : undefined)) { return } |
| 155 | // Track an event with action of the English version of the link text |
| 156 | let translationKey = $(anchor).attr('data-i18n') |
| 157 | if (translationKey == null) { translationKey = $(anchor).children('[data-i18n]').attr('data-i18n') } |
| 158 | if (translationKey) { |
| 159 | anchorText = $.i18n.t(translationKey, { lng: 'en-US' }) |
| 160 | } else { |
| 161 | anchorText = anchor.text |
| 162 | } |
| 163 | |
| 164 | if (__guard__($(e.target), x => x.hasClass('track-ab-result'))) { |
| 165 | properties = { trackABResult: true } |
| 166 | } |
| 167 | |
| 168 | if (anchorText) { |
| 169 | return this.homePageEvent(`Link: ${anchorText}`, properties || {}) |
| 170 | } else { |
| 171 | _.extend(properties || {}, { |
| 172 | clicked: __guard__(e != null ? e.currentTarget : undefined, x1 => x1.host) || 'unknown' |
| 173 | }) |
| 174 | return this.homePageEvent('Link:', properties) |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | afterRender () { |
| 179 | if (me.isAnonymous()) { |
nothing calls this directly
no test coverage detected