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

Method trackUtm

app/core/Tracker2/InternalTracker.js:86–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84 }
85
86 trackUtm () {
87 const properties = { url: window.location.href }
88 for (const [param, value] of new URLSearchParams(window.location.search)) {
89 if (param.startsWith('utm_')) {
90 properties[param] = value
91 }
92 }
93 if (!properties.utm_source || !properties.utm_medium) return
94 if (document.referrer) {
95 properties.referrer = document.referrer
96 }
97 this.trackEventInternal('Arrived With UTM', properties)
98 }
99}

Callers 1

_initializeTrackerMethod · 0.95

Calls 1

trackEventInternalMethod · 0.95

Tested by

no test coverage detected