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

Function trackFirstArrival

app/core/auth.js:76–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74Backbone.Mediator.subscribe('level:set-volume', onSetVolume, module.exports)
75
76const trackFirstArrival = function () {
77 // will have to filter out users who log in with existing accounts separately
78 // but can at least not track logouts as first arrivals using local storage
79 const beenHereBefore = storage.load(BEEN_HERE_BEFORE_KEY)
80 if (beenHereBefore) { return }
81 if (window.tracker != null) {
82 window.tracker.trackEvent('First Arrived')
83 }
84 return storage.save(BEEN_HERE_BEFORE_KEY, true)
85}
86
87const setTestGroupNumberUS = function () {
88 if (me && (me.get('country') === 'united-states') && (me.get('testGroupNumberUS') == null)) {

Callers 1

initFunction · 0.85

Calls 3

loadMethod · 0.45
trackEventMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected