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

Method identify

app/core/Tracker2/InternalTracker.js:22–34  ·  view source on GitHub ↗
(traits = {})

Source from the content-addressed store, hash-verified

20 }
21
22 async identify (traits = {}) {
23 await this.initializationComplete
24 const { me: user } = this.store.state
25 traits = _.merge(extractDefaultUserTraits(user), traits)
26 traits.host = document.location.host
27 if (me.isTeacher(true)) {
28 traits.teacher = true
29 } else {
30 traits = _.omit(traits, 'firstName', 'lastName')
31 }
32 traits.deviceMemory = typeof (navigator.deviceMemory) === 'number' ? navigator.deviceMemory : undefined
33 this.trackEventInternal('Identify', { id: me.id, traits })
34 }
35
36 async trackPageView () {
37 await this.initializationComplete

Callers

nothing calls this directly

Calls 3

trackEventInternalMethod · 0.95
extractDefaultUserTraitsFunction · 0.90
isTeacherMethod · 0.80

Tested by

no test coverage detected