(traits = {})
| 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 |
nothing calls this directly
no test coverage detected