MCPcopy Create free account
hub / github.com/codecombat/codecombat / homePageEvent

Method homePageEvent

app/views/HomeCNView.js:142–150  ·  view source on GitHub ↗
(action, extraproperties)

Source from the content-addressed store, hash-verified

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

Callers 6

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

Calls 3

isAnonymousMethod · 0.80
getMethod · 0.45
trackEventMethod · 0.45

Tested by

no test coverage detected