MCPcopy Index your code
hub / github.com/codecombat/codecombat / homePageEvent

Method homePageEvent

app/views/HomeView.js:192–201  ·  view source on GitHub ↗
(action, extraProperties)

Source from the content-addressed store, hash-verified

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

Callers 11

onClickRequestQuoteMethod · 0.95
onClickSetupClassMethod · 0.95
onClickStudentButtonMethod · 0.95
onClickTeacherButtonMethod · 0.95
onClickParentButtonMethod · 0.95
onClickTrackEventMethod · 0.95
onClickAnchorMethod · 0.95
trackPurchaseMethod · 0.95

Calls 4

isCocoFunction · 0.85
isAnonymousMethod · 0.80
getMethod · 0.45
trackEventMethod · 0.45

Tested by

no test coverage detected